All vulnerabilities

PyPI

CVE-2026-126297

NLTK: Quadratic-time CPU denial of service in ConllCorpusReader SRL instance builder via nested span rescan

Severity
High 8.7
Published
13 Nov 2026
Last changed
17 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.6% in the next 30 daysHigher than 48% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Uncontrolled resource consumption (CWE-400)Inefficient algorithmic complexity (CWE-407)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS 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
Also known as
GHSA-v8f3-6phw-6mh9
Sources
CVE Program, OSV.dev and GitHub

Description

ConllCorpusReader.srl_instances() builds semantic-role-labeling instances from a CoNLL corpus block. For a sentence block with P predicates and P span columns, the instance builder rescans every span column (and every span within it) once per predicate while searching for each predicate's head, giving O(P^2 * R) work. A single well-formed block that places the head span in the last column forces the full scan on every predicate, so an application that reads an attacker-supplied CoNLL SRL corpus can be driven into tens of seconds of single-threaded CPU. No authentication or user interaction is required.

_get_srl_instances iterates over the P predicates of a block; for each predicate it scans every span list and every span within it, using an inner break that stops only when a span tagged V or C-V containing the predicate word is found. When the sole head span is placed in the last span column, no earlier column matches, so the for ...

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • Every version before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References