PT-2021-23980 · Nltk+3 · Nltk+3
Tomaarsen
·
Published
2021-12-23
·
Updated
2025-03-24
·
CVE-2021-43854
CVSS v4.0
8.7
High
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions:
NLTK versions prior to 3.6.5
Description:
The issue is related to regular expression denial of service (ReDoS) attacks, which can cause significant execution time when a specifically crafted long input is provided to vulnerable functions. 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. If a program relies on any of the vulnerable functions for tokenizing unpredictable user input, upgrading to a version of NLTK without the vulnerability is strongly recommended.Recommendations:
For versions prior to 3.6.5, upgrade to NLTK 3.6.6 or later to resolve the issue.
As a temporary workaround for users unable to upgrade, limit the maximum length of an input to any of the vulnerable functions to bound the execution time.
Exploit
Fix
DoS
Resource Exhaustion
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Debian
Linuxmint
Nltk
Ubuntu