CVE-2021-43854
NLTK (Natural Language Toolkit) is a suite of open source Python modul ...
Overview
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
| Ecosystem | Package | Vulnerable | Fixed 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
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| nltk | 3.6.7-1 |
ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | nltk | 3.2.5-1ubuntu0.1+esm2 |
| 20.04-ESM | nltk | 3.4.5-2ubuntu0.1~esm2 |
References
- github.com https://github.com/nltk/nltk
- github.com https://github.com/nltk/nltk/commit/1405aad979c6b8080dbbc8e0858f89b2e3690341
- github.com https://github.com/nltk/nltk/commit/1405aad979c6b8080dbbc8e0858f89b2e3690341 (3.6.6)
- github.com https://github.com/nltk/nltk/issues/2866
- github.com https://github.com/nltk/nltk/pull/2869
- github.com https://github.com/nltk/nltk/security/advisories/GHSA-f8m6-h2c7-8h9x
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2021-859.yaml
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-43854
- ubuntu.com https://ubuntu.com/security/notices/USN-7365-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-43854
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.