NLTK before 3.10.0 (affected versions <= 3.9.4) contains a server-side request forgery (SSRF) vulnerability in the validate_network_url() function in nltk/pathsec.py. The _resolve_hostname() helper catches OSError and ValueError during socket.getaddrinfo() and returns an empty list; when DNS resolution fails, the validation loop executes no IP checks and the function fails open, allowing urlopen() to proceed without validation. An attacker who can trigger DNS resolution failures or use DNS rebinding can bypass SSRF protections and reach restricted network resources, including cloud metadata endpoints (e.g., 169.254.169.254).
Fix
Patch, vendor advisory and mitigation references on NVD 1
- https://github.com/nltk/nltk/security/advisories/GHSA-3gqm-fcw5-w839 Exploit, Mitigation, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 6.9 · nltkNVD modified 2026-10-14 13:10
Affected (CPE criteria) 1
cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
References 2
- https://github.com/nltk/nltk/security/advisories/GHSA-3gqm-fcw5-w839 Exploit, Mitigation, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-before-ssrf-via-dns-resolution-failure Third Party Advisory