CVE-2026-12372 — Vulnerability in nltk — CVE Details
NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.31%). Schedule for your next planned update.
Does your project use an affected nltk version?
Paste your requirements.txt to check it for CVE-2026-12372 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
A Server-Side Request Forgery (SSRF) vulnerability exists in nltk/nltk versions 3.9.4 and the current develop branch. The nltk.pathsec.validate_network_url() function, intended to prevent SSRF by rejecting internal network addresses, fails to reject IPs in the RFC 6598 shared address space (100.64.0.0/10). This occurs because Python's ipaddress module does not classify such addresses as is_private or is_global, and the current guard only checks is_private and a few explicit categories. An attacker who can influence a URL passed to NLTK's network-loading helpers can exploit this vulnerability to make a strict-mode application send requests to shared-address-space hosts, potentially exposing non-public infrastructure reachable from the application host. The impact is limited to SSRF-style confidentiality exposure, with no code execution claimed.
Advisory Timeline
- First published August 10, 2026 (108 days ago).
- Last revised October 2, 2026 — 54 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "nltk>=3.10.0"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| nltk PyPI · Affected: 0.8, 0.9, 0.9.3, 0.9.4 (+61 more) | 3.10.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-918Server-Side Request Forgery (SSRF)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.7 score means for each attack dimension.
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-12372ADVISORY
- https://github.com/nltk/nltk/commit/4a820afa58810cd05049b6c6eae306694d6cfe65WEB
- https://github.com/nltk/nltkPACKAGE
- https://github.com/nltk/nltk/releases/tag/v3.10.0WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3955.yamlWEB
- https://huntr.com/bounties/2911b643-571c-42e4-b0c2-9a1fa6f491dbWEB
Frequently Asked Questions
- What is CVE-2026-12372?
- NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts. This vulnerability has been assigned a severity rating of LOW (CVSS score: 3.7/10).
- How do I check if my project is affected by CVE-2026-12372?
- CVE-2026-12372 affects nltk. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-12372 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is difficult, or the impact is minor.
This is a below-median EPSS score — only 16.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-0848CRITICAL
- CVE-2026-62388HIGH
- CVE-2026-63311HIGH
- CVE-2026-128134HIGH
NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element
- CVE-2026-79676HIGH
NLTK: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement
- CVE-2026-65915MEDIUM
NLTK: FileSystemPathPointer.open() sandbox check is dead code — arbitrary file read via file:// protocol
- CVE-2026-128140MEDIUM
NLTK: Downloader cyclic collection indices cause an infinite closure walk
- CVE-2026-129231MEDIUM
NLTK: Quadratic-time DoS in SeekableUnicodeStreamReader.readline on an unterminated corpus line via per-iteration full-buffer rescan