Back to list

NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()` — GHSA-VP2X-QP44-57V7

GitHub · GitHub · GHSA-VP2X-QP44-57V7

ID
GHSA-VP2X-QP44-57V7
Date
Source
GitHub
Vendor
GitHub
Threat
medium
CVSS
6.3
EPSS
0.00222

Summary

## Summary `XMLCorpusView._read_xml_fragment()` reads a corpus file in 1 KiB blocks, appending each block to a growing `fragment` string, then calls `_VALID_XML_RE.match(fragment)` on the full accumulated buffer every iteration. Because each iteration rescans the entire accumulated fragment, the total amount of work grows quadratically with input size. Commit `c9c332284` (CWE-1333) made each `match()` call linear.…

Timeline

Published by source
2026-09-02

Risk context

  • Reported severity or threat level: medium.
  • Reported CVSS score: 6.3 out of 10.
  • Reported EPSS value: 0.00222.
  • Review exposure for the affected product or family: pip: nltk.

Product

pip: nltk

What to do

General, cautious steps (verify details in the official source):

  • Review exposure and plan remediation based on risk and environment.
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Evidence and provenance

Canonical advisory ID
GHSA-VP2X-QP44-57V7
Source
GitHub
Vendor
GitHub
Published by source
2026-09-02
Last source activity
2026-09-02
Additional identifiers
CVE-2026-81723
Curated by
hlukh.ch

Related advisories and connections

These advisories are connected by shared CVE, product, vendor, source, or time signals.