PyPI
CVE-2026-126299
NLTK: Quadratic-time CPU denial of service in CCG lexicon parser (fromstring) on wide bracket bodies and operator chains
- Severity
- High 8.7
- Published
- 13 Nov 2026
- Last changed
- 14 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
- 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-89p3-fcch-88ph
- Sources
- CVE Program, OSV.dev and GitHub
Description
The public CCG lexicon parser nltk.ccg.lexicon.fromstring parses caller-influenced lexicon text with two pure-Python loops whose cost is quadratic in the input width. A service that parses an untrusted CCG lexicon string can be driven into tens of seconds of single-threaded CPU by a few-megabyte input, starving the request worker. No authentication or user interaction is required.
matchBrackets consumes a bracket body one character at a time with inside = inside + rest[0]; rest = rest[1:]. The rest = rest[1:] tail re-slice copies the entire remaining string on every iteration, so a flat bracket body costs O(n^2). augParseCategory drives a while rest != "": operator loop that re-copies the regular-expression match tail (rest = app[3]) once per operator, which is also O(n^2) over a long operator chain.
Affected software
| Software | Affected versions |
|---|---|
nltkPyPI · osv:PyPI:nltk |
|
About nltk
- Weekly downloads (PyPI)
- 11,948,568PyPI Stats, 23 Nov 2026
Vulnerabilities in nltk
- In our list
- 32
- Published in the last 12 months
- 32
- Critical, last 12 months
- 1
- High, last 12 months
- 14
- Known exploited
- 0
- CVE-2026-128135NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data rootHigh 7.1 19 Nov 2026
- CVE-2026-128136NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinksMedium 6.1 19 Nov 2026
- CVE-2026-128137NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinksMedium 5.5 19 Nov 2026
- CVE-2026-128138NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command argumentsCritical 9.8 19 Nov 2026
- CVE-2026-128139NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of serviceHigh 7.5 19 Nov 2026
- CVE-2026-128140NLTK: Downloader cyclic collection indices cause an infinite closure walkMedium 6.5 19 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126299
- GitHub Advisory Database https://github.com/advisories/GHSA-89p3-fcch-88ph