GHSA-3m7f-6hxv-6796
Duplicate Advisory: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks
Impact
## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-8mpw-7fpc-4gqj. This link is maintained to preserve external references. ## Original Description NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption by supplying malformed TEI blocks with many unmatched opening tags. Attackers can exploit lazy regex patterns in the read_block method through public APIs like words() and tagged_words() to force repeated rescans and achieve near-quadratic runtime growth.
An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of outages.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | nltk | <= 3.10.2 | none recorded |