# CVE-2021-43854: nltk: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting researc...

CVE-2021-43854 is fixed in 3 products on 1 platform, first by DEBIAN-CVE-2021-43854, released December 23, 2021. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2021-43854
- Priority: High
- CVSS: 7.5 (high)
- EPSS: 0.0279
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Dec 23, 2021

## Description

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Versions prior to 3.6.5 are vulnerable to regular expression denial of service (ReDoS) attacks. The vulnerability is present in PunktSentenceTokenizer, sent_tokenize and word_tokenize. Any users of this class, or these two functions, are vulnerable to the ReDoS attack. In short, a specifically crafted long input to any of these vulnerable functions will cause them to take a significant amount of execution time. If your program relies on any of the vulnerable functions for tokenizing unpredictable user input, then we would strongly recommend upgrading to a version of NLTK without the vulnerability. For users unable to upgrade the execution time can be bounded by limiting the maximum length of an input to any of the vulnerable functions. Our recommendation is to implement such a limit.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | nltk Debian 12.15 (bookworm) | 3.6.7-1 | [DEBIAN-CVE-2021-43854](https://patchblox.com/security/data/fix/linux/debian-cve-2021-43854.md) | Dec 23, 2021 |
| Linux | nltk Debian 13.5 (trixie) | 3.6.7-1 | [DEBIAN-CVE-2021-43854](https://patchblox.com/security/data/fix/linux/debian-cve-2021-43854.md) | Dec 23, 2021 |
| Linux | nltk Debian 14 | 3.6.7-1 | [DEBIAN-CVE-2021-43854](https://patchblox.com/security/data/fix/linux/debian-cve-2021-43854.md) | Dec 23, 2021 |
| Linux | python-nltk Ubuntu 18.04.6 LTS (bionic) | 3.2.5-1ubuntu0.1+esm2 | [python-nltk 3.2.5-1ubuntu0.1+esm2](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python-nltk-3.2.5-1ubuntu0.1-esm2.md) | Jan 4, 2022 |
| Linux | python3-nltk Ubuntu 18.04.6 LTS (bionic) | 3.2.5-1ubuntu0.1+esm2 | [python3-nltk 3.2.5-1ubuntu0.1+esm2](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3-nltk-3.2.5-1ubuntu0.1-esm2.md) | Jan 4, 2022 |
| Linux | python3-nltk Ubuntu 20.04 LTS (focal) | 3.4.5-2ubuntu0.1~esm2 | [python3-nltk 3.4.5-2ubuntu0.1~esm2](https://patchblox.com/security/data/fix/linux/ubuntu-focal-python3-nltk-3.4.5-2ubuntu0.1-esm2.md) | Jan 4, 2022 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
