Skip to content
NLTKGHSA-2ww3-fxvq-293j

NLTK Vulnerable to REDoS

High7.5CVE-2021-3828 · Published Sep 29, 2021 · updated Oct 7, 2024

GitHub advisory

Affected versions

PackageAffectedFixed in
nltk
PyPI
< 3.6.43.6.4
Details and references

The nltk package is vulnerable to ReDoS (regular expression denial of service). An attacker that is able to provide as an input to the [`_read_comparison_block()`(https://github.com/nltk/nltk/blob/23f4b1c4b4006b0cb3ec278e801029557cec4e82/nltk/corpus/reader/comparative_sents.py#L259) function in the file `nltk/corpus/reader/comparative_sents.py` may cause an application to consume an excessive amount of CPU.

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Severity from
GitHub (reviewed advisory)
Weakness
CWE-1333, CWE-697
Also known as
CVE-2021-3828, PYSEC-2021-356

More NLTK advisories

All NLTK
DateAdvisory
Jan 62022Inefficient Regular Expression Complexity in nltk (word_tokenize, sent_tokenize)
CVE-2021-43854High7.5fixed in 3.6.6
Jan 62022NLTK Vulnerable to REDoS
CVE-2021-3842High7.5fixed in 3.6.6
Aug 232019NLTK Vulnerable To Path Traversal
CVE-2019-14751High7.5fixed in 3.4.5
Jun 282024ntlk unsafe deserialization vulnerability
CVE-2024-39705High7.5fixed in 3.9
Feb 18NLTK has a Zip Slip Vulnerability
CVE-2025-14009Critical10.0fixed in 3.9.3
Mar 4NLTK has a Path Traversal issue
CVE-2026-0847High8.6no fix yet

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.