Breaking News: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2021-43854

NLTK (Natural Language Toolkit) is a suite of open source Python modul ...

Overview

Published
23 Dec 2021
Modified
17 Jun 2026
High CVE
1 Registry packages
1 OS packages
3 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness: CWE-400

Affected packages · 1

Packages affected by CVE-2021-43854
EcosystemPackageVulnerableFixed in
PyPI nltk <3.6.6 3.6.6

Open a package to see all its vulnerabilities.

Operating systems · 9 fixes

debian 6 releases · 1 package

affected 3 fixed 3
nltk
debian fixes for CVE-2021-43854
ReleasePackageFixed in
10 nltk affected
11 nltk affected
12 nltk 3.6.7-1
13 nltk 3.6.7-1
14 nltk 3.6.7-1
9 nltk affected

echo 1 release · 1 package

fixed 1
nltk
echo fixes for CVE-2021-43854
ReleasePackageFixed in
nltk 3.6.7-1

ubuntu 2 releases · 1 package

fixed 2
nltk
ubuntu fixes for CVE-2021-43854
ReleasePackageFixed in
18.04-ESM nltk 3.2.5-1ubuntu0.1+esm2
20.04-ESM nltk 3.4.5-2ubuntu0.1~esm2

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.