Quadratic-time denial of service in NLTK corpus line reading
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 4 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-400.
Summary
NLTK before 3.10.4 is affected. SeekableUnicodeStreamReader.readline appends each block to a growing buffer and reruns splitlines over the whole buffer on every iteration, an inefficient algorithmic complexity flaw (CWE-407). An unauthenticated attacker who supplies a corpus file with one very long unterminated line can consume CPU in quadratic time and cause a denial of service in line-oriented corpus readers.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, SeekableUnicodeStreamReader.readline appends each new block to a growing character buffer and reruns splitlines over the entire buffer on every iteration. An attacker-controlled corpus file containing one very long unterminated line therefore causes quadratic CPU consumption in line-oriented corpus readers and can deny service. This issue is fixed in version 3.10.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nltk | nltk | before 3.10.4 | 3.10.4 | Patch available | CNA |
| — | nltk (PyPI) | before 3.10.4 | 3.10.4 | Patch available | GHSA-q4c8-9gwf-255x |
- nltk Vendornltk Affected before 3.10.4 Fixed in 3.10.4 Patch available CNA
- nltk (PyPI) Vendor— Affected before 3.10.4 Fixed in 3.10.4 Patch available GHSA-q4c8-9gwf-255x
Remediation
Upgrade NLTK to version 3.10.4, the fixed version on PyPI. Red Hat lists Lightspeed Core, OpenShift Lightspeed, Red Hat Ansible Automation Platform 2 and Red Hat OpenShift AI (RHOAI) as affected without a fix, and has no fix plan available for them.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA nltk (nltk) Fixed in 3.10.4
- Fix · GHSA-q4c8-9gwf-255x nltk (PyPI) Fixed in 3.10.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Lightspeed Core | Affected | No fix yet: Fix deferred |
| OpenShift Lightspeed | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Timeline
- 2026-11-19 Threatist record created from CVE-2026-129231
- 2026-11-20 Alias added: GHSA-q4c8-9gwf-255x
- 2026-11-20 Fix available: PyPI/[email protected] · GHSA-q4c8-9gwf-255x
- 2026-11-20 CVSS score added · GHSA-q4c8-9gwf-255x
- 2026-11-20 Weakness changed · GHSA-q4c8-9gwf-255x
- 2026-11-20 6 new references · GHSA-q4c8-9gwf-255x
- 2026-11-20 Affected versions changed · Red Hat
- 2026-11-20 CVSS score added · Red Hat
- 2026-11-20 CISA SSVC decision points changed
References
More nltk vulnerabilities
- TI-2026-95059 NLTK incomplete fix allows JVM sandbox bypass via launcher tokens CVSS 3.1CRITICAL 9.8
- 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-91242 Symlink escape in NLTK YCOECorpusReader lets attackers read files CVSS 4.0HIGH 8.7
Sources
- CVE-2026-129231 · CVE Program
- CVE-2026-129231 · NVD
- FIRST EPSS
- GHSA-q4c8-9gwf-255x · GitHub Advisory Database · CC BY 4.0
- CVE-2026-129231 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences