
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-78681 is an XML Entity Expansion ("Billion Laughs") denial-of-service vulnerability in the Natural Language Toolkit (NLTK) Python library. NLTK versions before 3.10.3 use xml.etree.ElementTree to parse XML in multiple modules, which honors entity declarations in document DTDs, allowing attackers to craft nested entity payloads that expand from hundreds of bytes to megabytes in memory. Affected modules include nltk.chunk.named_entity.load_ace_file, nltk.internals.ElementWrapper, and nltk.downloader (Package.fromxml, Collection.fromxml, _find_collections, _find_packages). The vulnerability was published on August 25, 2026, with a patch available in version 3.10.3. It carries a CVSS v3.1 score of 7.5 (High) and a CVSS v4.0 score of 8.7 (High) (GitHub Advisory, NLTK Security Advisory).
The root cause is CWE-776 (Improper Restriction of Recursive Entity References in DTDs — XML Entity Expansion). Python's xml.etree.ElementTree honors internal DTD entity declarations, allowing nested entity references where each level multiplies memory consumption by a factor of ten. For example, a 330-byte payload at 5 nesting levels expands to 1,000,000 characters in memory. While libexpat 2.6.0+ introduced an amplification cap, it only activates above an ~8 MiB output threshold, and older libexpat builds (still common with Python 3.10/3.11) have no cap at all — meaning payloads up to ~1 MB per parse always succeed. Notably, external entities are not resolved, so this is a pure memory-amplification DoS (not an XXE/file disclosure issue). The fix routes all affected call sites through a new nltk.xmlsec module that rejects entity declarations, preferring defusedxml and falling back to a xml.parsers.expat pre-scan when defusedxml is absent (NLTK Security Advisory, GitHub Advisory).
Successful exploitation causes denial of service by exhausting the memory of the process running NLTK, potentially crashing the service or rendering it unavailable. The attack requires no authentication, no user interaction, and no special privileges — any unauthenticated network attacker who can submit XML input to an NLTK-powered application is a potential threat actor. There is no confidentiality or integrity impact; the vulnerability is limited to availability (GitHub Advisory, NLTK Security Advisory).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at the time of disclosure (GitHub Advisory). The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the NLTK security advisory includes a detailed attack demonstration with reproducible payload code, lowering the barrier for exploitation. No threat actor attribution has been reported.
nltk.internals.ElementWrapper, nltk.chunk.named_entity.load_ace_file, or nltk.downloader XML parsing functions).<!DOCTYPE bomb [
<!ENTITY e0 "AAAAAAAAAA">
<!ENTITY e1 "&e0;&e0;&e0;&e0;&e0;&e0;&e0;&e0;&e0;&e0;">
<!ENTITY e2 "&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;">
<!ENTITY e3 "&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;">
<!ENTITY e4 "&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;">
<!ENTITY e5 "&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;">
]>
<root>&e5;</root>xml.etree.ElementTree parser expands the nested entities in memory, consuming megabytes of RAM per request. Repeated submissions amplify the effect, causing the process to crash or become unresponsive.ElementTree still processes the real declaration and expands it (NLTK Security Advisory).<!DOCTYPE and <!ENTITY declarations targeting NLTK-powered endpoints; unusually small request sizes paired with disproportionate server-side memory consumption./var/log/syslog, dmesg) referencing the NLTK process.The primary remediation is to upgrade NLTK to version 3.10.3 or later, which routes all affected XML parsing through the new nltk.xmlsec module that rejects entity declarations (NLTK Security Advisory). As an interim measure, install defusedxml in the Python environment — NLTK 3.10.3's fallback mechanism prefers it — and implement input validation to reject XML documents containing <!DOCTYPE or <!ENTITY declarations before they reach NLTK. Additionally, consider implementing rate limiting on XML-accepting endpoints and memory monitoring/alerting to detect and mitigate denial-of-service attempts before they cause full service outages (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."