CVE-2026-12372: Server-Side Request Forgery (SSRF) in nltk/nltk
A Server-Side Request Forgery (SSRF) vulnerability exists in nltk/nltk versions 3.9.4 and the current develop branch. The nltk.pathsec.validatenetworkurl() 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 isprivate or isglobal, and the current guard only checks isprivate 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
nltk/nltkto a version that resolves this vulnerability.Fixed in 3.9.4 - Compensating control
If you use NLTK network-loading helpers with attacker-influenced URLs, restrict those helpers to only allow-listed external domains/URLs, and block access to RFC 6598 shared address space (100.64.0.0/10) from the application host (e.g., via egress firewall rules).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-12372?
The severity of CVE-2026-12372 is rated as low, with a score of 3.7.
What type of vulnerability is represented by CVE-2026-12372?
CVE-2026-12372 represents a Server-Side Request Forgery (SSRF) vulnerability.
Which versions of nltk/nltk are affected by CVE-2026-12372?
CVE-2026-12372 affects nltk/nltk versions 3.9.4 and the current develop branch.
How can CVE-2026-12372 affect network security?
CVE-2026-12372 can potentially expose internal network addresses to unauthorized access due to the failure to reject certain IPs.
How do I fix CVE-2026-12372?
To fix CVE-2026-12372, update to a version of nltk/nltk that addresses this vulnerability.