NLTK: Quadratic-time DoS in PorterStemmer via long runs of 'y' — GHSA-WW6M-CW3F-Q94G
GitHub · GitHub · GHSA-WW6M-CW3F-Q94G
ID
GHSA-WW6M-CW3F-Q94G
GHSA-WW6M-CW3F-Q94G
Date
Source
GitHub
GitHub
Vendor
GitHub
GitHub
Threat
medium
medium
CVSS
6.9
6.9
EPSS
0.00363
0.00363
Summary
`nltk.stem.PorterStemmer.stem()` -- a ubiquitous public API applied to arbitrary, often untrusted, tokens -- runs in O(n^2) time on a token containing a long run of the letter 'y', letting a single ~20-50 KB token pin a CPU core (CWE-407). ## Root cause `_is_consonant(word, i)` was made *iterative* (commit for #3633, GHSA/CWE-674) to fix an earlier unbounded-recursion `RecursionError` on `'y'*10000`. The iterative…
Timeline
- Published by source
- 2026-09-02
Risk context
- Reported severity or threat level: medium.
- Reported CVSS score: 6.9 out of 10.
- Reported EPSS value: 0.00363.
- 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-WW6M-CW3F-Q94G
- Source
- GitHub
- Vendor
- GitHub
- Published by source
- 2026-09-02
- Last source activity
- 2026-09-02
- Additional identifiers
- CVE-2026-81722
- Curated by
- hlukh.ch
Related advisories and connections
These advisories are connected by shared CVE, product, vendor, source, or time signals.