Description
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.
Published: 2026-08-25
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

NLTK versions earlier than 3.10.3 use the standard xml.etree.ElementTree parser to process XML documents, and this parser honors entity declarations in the document DTD. An attacker can craft a payload with deeply nested entity declarations that enlarge a small number of bytes into many megabytes, exhausting the memory allocated for parsing and causing a denial of service. This flaw is an example of improper handling of XML entity expansions (CWE‑776) that compromises availability for any application that uses the vulnerable library.

Affected Systems

The vulnerable product is the Python NLTK library distributed under the nltk namespace. All releases prior to 3.10.3, regardless of sub‑version, contain the affected XML parsing code and are therefore susceptible to exploitation in any environment where the library is imported or instantiated.

Risk and Exploitability

The CVSS score of 8.7 classifies this as a high‑severity vulnerability. EPSS information is not available, and the vulnerability is not listed in CISA KEV. The likely attack vector is that an attacker supplies a specially crafted XML document to any component that invokes NLTK’s XML parsing functions. Based on the description, it is inferred that a remote attacker could deliver the payload through an API endpoint or form that accepts XML input, whereas a local attacker could trigger the denial by executing a malicious script or feeding a crafted file to a command‑line tool that uses NLTK.

Generated by OpenCVE AI on August 25, 2026 at 04:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the NLTK library to version 3.10.3 or later.
  • Configure the XML parser to disable DTD entity processing by setting ElementTree’s resolve_entities option to False or by switching to a parser that omits entity resolution.
  • Add input validation or size limits on XML payloads before they reach the parser to reduce the chance of resource exhaustion.

Generated by OpenCVE AI on August 25, 2026 at 04:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-97qj-x29f-37w7 NLTK: Entity-expansion DoS (billion laughs) via remaining raw ElementTree parses
History

Thu, 27 Aug 2026 06:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 25 Aug 2026 02:00:00 +0000

Type Values Removed Values Added
Description 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.
Title NLTK before 3.10.3 Entity Expansion DoS via ElementTree
First Time appeared Nltk
Nltk nltk
Weaknesses CWE-776
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk
Nltk nltk
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-26T16:12:19.369Z

Reserved: 2026-08-25T01:17:12.263Z

Link: CVE-2026-78681

cve-icon Vulnrichment

Updated: 2026-08-26T15:58:38.755Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-25T02:16:52.750

Modified: 2026-09-01T20:09:22.720

Link: CVE-2026-78681

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T04:15:04Z

Weaknesses
  • CWE-776

    Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')