CVE-2026-81722
nltk: nltk PorterStemmer: Denial of Service due to inefficient token processing
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-407
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | nltk | <3.10.3 | 3.10.3 |
Open a package to see all its vulnerabilities.
Operating systems · 9 fixes
chainguard 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| open-webui | 0.11.3-r1 | |
| nemo | 2.7.3-r27 |
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | nltk | affected |
| 12 | nltk | affected |
| 13 | nltk | affected |
| 14 | nltk | 3.10.3-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| nltk | affected |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| label-studio | 1.23.1-r0 |
wolfi 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| open-webui | 0.11.3-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-81722
- github.com https://github.com/nltk/nltk
- github.com https://github.com/nltk/nltk/commit/7808692d451b962711005d954859bb83aabcf8fa
- github.com https://github.com/nltk/nltk/releases/tag/v3.10.3
- github.com https://github.com/nltk/nltk/security/advisories/GHSA-ww6m-cw3f-q94g
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3738.yaml
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-81722
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-81722
- www.vulncheck.com https://www.vulncheck.com/advisories/nltk-porterstemmer-before-3.10.3-quadratic-time-dos
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.