Quick answers
- Is CVE-2026-81725 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-81725 being exploited in the wild.
- How severe is CVE-2026-81725?
- Medium severity, with a CVSS score of 4, published 27 August 2026.
- Which products and versions are affected?
- nltk (PyPI) <= 3.10.2, ECOSYSTEM:introduced=0,fixed=3.10.3.
- Is there a fix for CVE-2026-81725?
- Yes. nltk (PyPI): upgrade to 3.10.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-81725 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-81725?
- 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.
How to fix
- nltk (PyPI): upgrade to 3.10.3 or later
pip install "nltk>=3.10.3"
Technical details
The vulnerability is a regular-expression denial of service (ReDoS) affecting nltk.corpus.reader.pl196x.TEICorpusView.read_block and Pl196xCorpusReader public methods (words(), tagged_words()). The root cause is the use of lazy regex quantifiers (.*?) that scan entire TEI blocks without bounds. When processing malformed XML-like content with many unmatched opening tags but no closing tags, the regex engine rescans from each opening-tag position toward the end of the block, failing repeatedly and restarting. This creates quadratic time complexity—approximately four-fold runtime increase per doubling of malformed tags. An attacker can exploit this by supplying a corpus file with a valid header followed by a text block containing many unclosed opening tags. No authentication or special privileges are required; the application need only parse attacker-controlled corpus files through public APIs. The patch (v3.10.3+) replaces the whole-block lazy-regex parser with a linear parser or bounded tokenizer.
Affected products
- NLTK NLTK <= 3.10.2
Identifiers
- CVE-2026-81725
- GHSA-8mpw-7fpc-4gqj
- PYSEC-2026-3752
Timeline
- 2026-08-12: disclosed: Initial GitHub advisory publication
- 2026-09-08: advisory: Advisory published to GitHub Advisory Database
- 2026-08-12: patched: Fix committed (v3.10.3+)
References
- https://github.com/nltk/nltk/security/advisories/GHSA-8mpw-7fpc-4gqj
- https://github.com/nltk/nltk/commit/7808692d451b962711005d954859bb83aabcf8fa
- https://github.com/nltk/nltk/releases/tag/v3.10.3
- https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3752.yaml
- https://www.vulncheck.com/advisories/nltk-before-3.10.3-regular-expression-denial-of-service-via-pl196xcorpusreader