CVE-2026-81722
nltk PorterStemmer in versions <= 3.10.2 (fixed in 3.10.3) contains …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/nltk/nltk/security/advisories/GHSA-ww6m-cw3f-q94g
- www.vulncheck.com/advisories/nltk-porterstemmer-before-3.10.3-quadratic-time-dos
- nvd.nist.gov/vuln/detail/CVE-2026-81722
- github.com/nltk/nltk/commit/7808692d451b962711005d954859bb83aabcf8fa
- github.com/nltk/nltk/releases/tag/v3.10.3
- github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3738.yaml
- github.com/advisories/GHSA-ww6m-cw3f-q94g
- nvd.nist.gov/vuln/detail/CVE-2026-81722
- cve.org/CVERecord?id=CVE-2026-81722
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.