NLTK versions before 3.10.3 use xml.etree.ElementTree to parse XML in multiple modules, which honors entity declarations in document DTDs. Attackers can craft XML payloads with nested entity declarations that expand from hundreds of bytes to megabytes in memory, causing denial of service.
Fix
Patch, vendor advisory and mitigation references on NVD 1
- https://github.com/nltk/nltk/security/advisories/GHSA-97qj-x29f-37w7 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 8.7 · nltkNVD modified 2026-10-12 21:10
Affected (CPE criteria) 1
cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
References 2
- https://github.com/nltk/nltk/security/advisories/GHSA-97qj-x29f-37w7 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-before-entity-expansion-dos-via-elementtree Third Party Advisory