7.5

CVE-2021-43854: nltk Uncontrolled Resource Consumption

CVSS: 7.5v3.1HighModified
AliasesGHSA-f8m6-h2c7-8h9xPYSEC-2021-859UBUNTU-CVE-2021-43854
Published 23-12-2021Last modified 04-08-2024

Vulnerability summary

CVE-2021-43854 is a high (CVSS 7.5) Uncontrolled Resource Consumption vulnerability in nltk. EPSS estimates a 2.79% chance of exploitation in the next 30 days, higher than 86.2% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
41/100
0100
Medium · default modelHow is this calculated?
CVSS score
7.5/10
010
High · v3.1 (CVE.org)
EPSS score
2.79%
0%100%
Low · +0.12 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 23-12-2021
    PublishedVulnerability first disclosed.
  2. 04-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 5 sources · 3 versions

EPSS trend

Probability

2.79%

Chance of exploitation in the next 30 days

Percentile

86%

Versus all other CVEs

30-day change

+0.12 pp

From 2.67% on 18-09-2026

18-09-202618-10-2026
EPSS score
2.79%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • githubUnverified

    Nltk

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Debian1 product
  • nltk< 3.6.7-1
Nltk1 product
PyPI1 product
  • nltk< 3.6.6 | < 1405aad979c6b8080dbbc8e0858f89b2e3690341 | < 3.6.5
Ubuntu1 product
  • nltk< 2.0~b9-0ubuntu4.1~esm4 | < 3.1-1ubuntu0.1+esm2 | < 3.2.5-1ubuntu0.1+esm2 | < 3.4.5-2ubuntu0.1~esm2

4 vendors · 4 products

References

11 links
Show all 11 references