MISFIRE

Browse / AI Framework and Platform Flaws / CVE-2021-3828

NLTK Vulnerable to REDoS

CVE-2021-3828 ยท 2021-09-29 high

Class
AI Framework and Platform Flaws (filed by a model that read the source)
Technique
Denial of service
Affected
nltk (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
1.6% chance of exploitation in 30 days

How it works, in short

A regular expression in a corpus reader backtracks catastrophically on crafted input, consuming excessive CPU. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.