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?
- High severity, with a CVSS score of 7.5, published 25 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: Fix available in 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 an XML Entity Expansion attack (CWE-776, "billion laughs") affecting multiple NLTK call sites that use xml.etree.ElementTree directly: nltk.chunk.named_entity.load_ace_file, nltk.internals.ElementWrapper, nltk.downloader (Package.fromxml, Collection.fromxml), and related functions. The root cause is that ElementTree honors entity declarations in DTD subsets without restriction. Attackers craft payloads with nested entity declarations where each nesting level multiplies output by approximately 10 while adding minimal input bytes—a payload of ~330 bytes can expand to 1 MB in memory. External entities are not resolved so this is memory-amplification DoS rather than XXE file disclosure. Attack vector is network-based with no authentication or user interaction required. The fix routes all affected parsing sites through a new nltk.xmlsec module that refuses entity declarations, using defusedxml with a fallback to xml.parsers.expat pre-scan. Patched in version 3.10.3.
Affected products
- NLTK Project NLTK < 3.10.3
Timeline
- 2026-08-11: disclosed: Original advisory GHSA-97qj-x29f-37w7 published
- 2026-08-25: advisory: Duplicate advisory GHSA-jx89-3qg8-p2mr published and later withdrawn
- 2026: patched: Fix available in version 3.10.3