Vulnerability · Published Aug 27, 2026 · Assigned by VulnCheck
CVE-2026-81722nltk PorterStemmer before 3.10.3 Quadratic-time DoS
High 7.5
In plain English
A high-severity security flaw in nltk from nltk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
nltk PorterStemmer in versions <= 3.10.2 (fixed in 3.10.3) contains an inefficient-algorithmic-complexity denial of service in PorterStemmer.stem(). The _is_consonant() helper walks backward over the entire run of trailing 'y' characters on every call, and _measure() invokes it for each stem position, causing O(n^2) behavior. A single ~20-50 KB untrusted token consisting of a long run of the letter 'y' followed by a matching suffix (e.g., 'ness') can pin a CPU core for seconds to minutes, causing availability impact.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | nltk | no fix listed | DEBIAN-CVE-2026-81722 |
| Debian:13 | nltk | no fix listed | DEBIAN-CVE-2026-81722 |
| Debian:14 | nltk | 3.10.3-1 | DEBIAN-CVE-2026-81722 |
| PyPI | nltk | 3.10.3 | GHSA-ww6m-cw3f-q94g |
| PyPI | nltk | 3.10.3 | PYSEC-2026-3738 |
Affected products (as reported)
Weakness: CWE-407 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- GitHub Security Advisory (GHSA-ww6m-cw3f-q94g) vendor-advisory
- VulnCheck Advisory: nltk PorterStemmer before 3.10.3 Quadratic-time DoS third-party-advisory