Description
NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption by supplying malformed TEI blocks with many unmatched opening tags. Attackers can exploit lazy regex patterns in the read_block method through public APIs like words() and tagged_words() to force repeated rescans and achieve near-quadratic runtime growth.
Published: 2026-08-27
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Patch
AI Analysis

Impact

NLTK prior to version 3.10.3 processes text via the Pl196xCorpusReader using a lazy regular expression that can be manipulated. By supplying TEI blocks containing many unmatched opening tags, an attacker can force the read_block method to rescan sections repeatedly. This quadratic growth in CPU consumption can eat up workstation or server resources, effectively creating a denial‑of‑service condition. The flaw is a classic case of CWE‑1333, a regular expression denial of service, and a CWE‑400 unbounded resource consumption weakness.

Affected Systems

The vulnerability affects the NLTK python library, as identified by the CVE vendor product entry. Any installation of NLTK that is older than version 3.10.3 is potentially exposed. Users who rely on the public interfaces words() or tagged_words() to handle TEI documents are the most at risk.

Risk and Exploitability

The CVSS score is 6.3 and the EPSS score is <1%, indicating a moderate severity with very low but non‑zero exploitation probability. The flaw is not listed in the CISA KEV catalog, suggesting no confirmed widespread exploitation yet. Attackers can exploit the weakness by submitting specially crafted TEI content through the standard API endpoints; the attack requires no special privileges and leverages normal library usage, making it accessible to anyone able to feed data into the reader. This flaw combines a CWE‑1333 regular expression denial‑of‑service pattern with a CWE‑400 resource exhaustion.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to version 3.10.3 or newer, which fixes the regular‑expression handling in Pl196xCorpusReader.
  • Sanitize or validate TEI input before passing it to words() or tagged_words(); reject documents with excessive unmatched opening tags or enforce a strict size limit.
  • Implement application‑level timeouts or resource quotas on processes that parse TEI data to prevent long‑running regex operations from exhausting server resources.

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

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8mpw-7fpc-4gqj NLTK: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks
History

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

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

None

threat_severity

Important


Fri, 28 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


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

Type Values Removed Values Added
Description NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption by supplying malformed TEI blocks with many unmatched opening tags. Attackers can exploit lazy regex patterns in the read_block method through public APIs like words() and tagged_words() to force repeated rescans and achieve near-quadratic runtime growth.
Title NLTK before 3.10.3 Regular Expression Denial of Service via Pl196xCorpusReader
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-28T15:58:35.166Z

Reserved: 2026-08-27T11:15:29.420Z

Link: CVE-2026-81725

cve-icon Vulnrichment

Updated: 2026-08-27T18:24:03.206Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-09-01T20:06:33.420

Link: CVE-2026-81725

cve-icon Redhat

Severity : Important

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

Links: CVE-2026-81725 - Bugzilla

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption