NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts
Published 10 Aug 2026 · Updated 2 Oct 2026
Is your project on an affected nltk?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <3.10.0
- Fixed in
- 3.10.0
pip install 'nltk>=3.10.0'Details
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.
Is GHSA-2jhm-w3mp-jcwr in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected nltk, and gives you the command that fixes it.
More advisories for nltk
- HighCVE-2026-128135NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data root · 19 Nov 2026
- MediumCVE-2026-128136NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinks · 19 Nov 2026
- MediumCVE-2026-128137NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinks · 19 Nov 2026
- CriticalCVE-2026-128138NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments · 19 Nov 2026
- HighCVE-2026-128139NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of service · 19 Nov 2026
- MediumCVE-2026-128140NLTK: Downloader cyclic collection indices cause an infinite closure walk · 19 Nov 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-12372
- Linkgithub.com/nltk/nltk/commit/4a820afa58810cd05049b6c6eae306694d6cfe65
- Packagegithub.com/nltk/nltk
- Linkgithub.com/nltk/nltk/releases/tag/v3.10.0
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3955.yaml
- Linkhuntr.com/bounties/2911b643-571c-42e4-b0c2-9a1fa6f491db
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.