Description
NLTK versions before 3.10.3 contain a quadratic CPU exhaustion vulnerability in XMLCorpusView._read_xml_fragment() that rescans accumulated XML fragments on every 1 KiB block read. Attackers can provide malformed XML corpus files to cause severe CPU consumption and denial of service through affected readers like BNCCorpusReader.
Published: 2026-08-27
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via quadratic CPU exhaustion
Action: Apply Patch
AI Analysis

Impact

The vulnerability is a quadratic CPU consumption flaw in the NLTK library’s XMLCorpusView._read_xml_fragment() method, which rescans accumulated XML fragments whenever a 1 KiB block is read. A malicious XML corpus file can trigger CPU usage that grows roughly with the square of the file size, exhausting system resources and causing a denial‑of‑service condition. This issue is classified as CWE‑400 Resource Exhaustion and CWE‑776.

Affected Systems

The affected product is the Python Natural Language Toolkit (NLTK) distributed as the nltk package. All releases prior to version 3.10.3 are vulnerable; the flaw manifests when an XMLCorpusView reader such as BNCCorpusReader processes XML corpus files. Any application that loads XML corpora with NLTK before 3.10.3 is at risk.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity. EPSS score of <1% indicates a low probability of exploitation, but exploitation is still possible, and the vulnerability is not listed in CISA’s KEV catalog. An attacker can supply a specially crafted XML corpus file; local or remote code that parses XML corpora could be abused to trigger the excessive CPU use. If a service continuously processes untrusted XML corpora, it could be taken down, affecting availability but not confidentiality or integrity.

Generated by OpenCVE AI on September 1, 2026 at 18:04 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to version 3.10.3 or newer, which removes the quadratic re‑scan issue.
  • If an immediate upgrade is not possible, avoid using XMLCorpusView readers on untrusted XML corpus files and limit processing to trusted or pre‑validated corpora.
  • Implement pre‑processing checks that enforce size limits or validate XML syntax before allowing XMLCorpusView to read the file, thereby mitigating excessive CPU consumption.

Generated by OpenCVE AI on September 1, 2026 at 18:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vp2x-qp44-57v7 NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()`
History

Tue, 01 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-776
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 31 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 27 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Description NLTK versions before 3.10.3 contain a quadratic CPU exhaustion vulnerability in XMLCorpusView._read_xml_fragment() that rescans accumulated XML fragments on every 1 KiB block read. Attackers can provide malformed XML corpus files to cause severe CPU consumption and denial of service through affected readers like BNCCorpusReader.
Title NLTK before 3.10.3 Quadratic CPU Exhaustion via XMLCorpusView
First Time appeared Nltk
Nltk nltk
Weaknesses CWE-400
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk
Nltk nltk
References
Metrics cvssV3_1

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

cvssV4_0

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


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-31T18:12:57.437Z

Reserved: 2026-08-27T11:13:14.064Z

Link: CVE-2026-81723

cve-icon Vulnrichment

Updated: 2026-08-31T18:12:24.670Z

cve-icon NVD

Status : Received

Published: 2026-08-27T17:21:02.957

Modified: 2026-08-31T19:17:14.590

Link: CVE-2026-81723

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-27T14:51:16Z

Links: CVE-2026-81723 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-01T18:15:04Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-776

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