Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.7, published 27 August 2026.
- Which products and versions are affected?
- nltk (PyPI) <= 3.10.2.
- Is there a fix for This vulnerability?
- A patch was published on 2026-08-12: Fix released in NLTK version 3.10.3 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run nltk (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
The vulnerability is a ReDoS (Regular Expression Denial of Service) in the TEICorpusView.read_block method and related Pl196xCorpusReader public APIs. The root cause is the use of lazy quantifier regexes (.*?) that process entire TEI blocks from attacker-controlled corpus files. When a malformed file contains many opening XML-like tags without corresponding closing tags, each regex attempt scans toward the end of the block before failing, then restarts from the next opening tag position. This creates O(n²) behavior rather than linear parsing. The vulnerability is exploitable through public APIs like words() and tagged_words() without requiring authentication or special privileges. Attack complexity is high (requires malformed corpus files), but the attack vector is network-accessible if the application processes untrusted corpus files. The impact is availability degradation through CPU exhaustion. The fix was released in NLTK version 3.10.3, which replaced the whole-block lazy-regex parser with a linear parser or bounded tokenizer.
Affected products
- NLTK NLTK <= 3.10.2
Timeline
- 2026-08-27: disclosed: Advisory published to GitHub Advisory Database
- 2026-08-12: patched: Fix released in NLTK version 3.10.3