Read the docs

CPU exhaustion in NLTK TreebankWordTokenizer.span_tokenize

Priority LOW 31CWE-407Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-407.

Summary

NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity flaw in TreebankWordTokenizer.span_tokenize, which uses repeated list.pop(0) calls. A remote attacker who can submit long runs of double-quote characters to a service that span-tokenizes untrusted text causes quadratic CPU consumption without authentication. This can exhaust a CPU core and degrade availability (CWE-407).

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit long runs of double-quote characters to services span-tokenizing untrusted text, exhausting a CPU core and degrading availability.

Why it matters now

EPSS 0.00473 41st percentileScored 2026-11-16
Fix Fixed nltk (nltk): 3.10.4nltk (PyPI): 3.10.4

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
nltknltk3.2.5 to before 3.10.43.10.4Patch availableCNA
—nltk (PyPI)3.2.5 to before 3.10.43.10.4Patch availableGHSA-ffr9-mgrr-wcvr
  • nltk Vendornltk Affected 3.2.5 to before 3.10.4 Fixed in 3.10.4 Patch available CNA
  • nltk (PyPI) Vendor— Affected 3.2.5 to before 3.10.4 Fixed in 3.10.4 Patch available GHSA-ffr9-mgrr-wcvr

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*——nltk
  • cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* Versions — — ·nltk

Remediation

NLTK fixed in version 3.10.4 on PyPI and in the nltk product. Upgrade to NLTK 3.10.4 or later.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA nltk (nltk) Fixed in 3.10.4
  • Fix · GHSA-ffr9-mgrr-wcvr nltk (PyPI) Fixed in 3.10.4 Advisory →

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    nltk 3.10.4

    10 records Highest priority Priority HIGH 2 HIGH, 2 MEDIUM, 6 LOW

    Other records, highest priority first

    • TI-2026-91241 NLTK denial of service in SteppingRecursiveDescentParser.parse()Priority HIGH 77
    • TI-2026-91237 NLTK Quadratic-Time Denial of Service via CCG Lexicon fromstringPriority HIGH 77
    • TI-2026-91233 Arbitrary file read in NLTK BllipParser via model pathsPriority MEDIUM 64

Timeline

  1. 2026-11-13 Threatist record created from CVE-2026-126300
  2. 2026-11-13 Alias added: GHSA-rg32-vgf9-927c
  3. 2026-11-13 Alias added: GHSA-ffr9-mgrr-wcvr
  4. 2026-11-13 Fix available: PyPI/[email protected] · GHSA-ffr9-mgrr-wcvr
  5. 2026-11-13 CVSS score added · GHSA-ffr9-mgrr-wcvr
  6. 2026-11-13 Weakness changed · GHSA-ffr9-mgrr-wcvr
  7. 2026-11-13 6 new references · GHSA-ffr9-mgrr-wcvr

References

  • TI-2026-00629 Arbitrary Code Execution in NLTK StanfordSegmenter via Untrusted JAR Loading CVSS 3.0CRITICAL 10.0
  • TI-2025-12800 Zip Slip Vulnerability in nltk/nltk Leading to Remote Code Execution CVSS 3.0CRITICAL 10.0
  • TI-2026-55173 NLTK before 3.10.3 JVM Argument Injection via Per-Call Options CVSS 4.0CRITICAL 9.3
  • TI-2026-55155 NLTK before 3.10.3 Remote Code Execution via Unsafe Pickle Deserialization CVSS 4.0CRITICAL 9.3
  • TI-2026-91241 NLTK denial of service in SteppingRecursiveDescentParser.parse() CVSS 4.0HIGH 8.7
  • TI-2026-91237 NLTK Quadratic-Time Denial of Service via CCG Lexicon fromstring CVSS 4.0HIGH 8.7
See all 57 →

Sources