Gptline: NLTK: pathsec SSRF protection can be bypassed when a proxy is configured (CVE-2026-78682)
Description
NLTK's pathsec module contains a server-side request forgery (SSRF) vulnerability in proxied environments. The vulnerability arises because when an HTTP proxy is configured, the hostname validation performed by pathsec.urlopen() is bypassed, allowing requests to internal-only services via the proxy. This affects functions like nltk.data.load and nltk.downloader.Downloader methods. The issue is present in NLTK version 3.10.0-rc2 and not reproducible in 3.9.4. A fix has been implemented that blocks proxied fetches unless explicitly opted into, preventing unvalidated proxied requests.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability (CVE-2026-78682) in NLTK's pathsec.urlopen and related functions allows SSRF bypass when an HTTP proxy is configured. The root cause is that proxy-handler inheritance disables the _SafeHTTPHandler and _SafeHTTPSHandler, so the validated hostname no longer matches the actual egress destination. This enables an attacker to fetch internal-only HTTP resources, load forged downloader indexes, and install attacker-chosen package content by exploiting the proxy's network view. The vulnerability affects NLTK version 3.10.0-rc2 and is not present in 3.9.4. The remediation involves refusing proxied fetches whose egress cannot be validated unless explicitly allowed by environment variables or flags. This fix closes the entire class of proxied SSRF bypasses.
Potential Impact
Consumers relying on pathsec as an SSRF protection mechanism in proxied environments can be tricked into accessing internal-only HTTP services and loading malicious content. This can lead to unauthorized disclosure of internal secrets and installation of attacker-controlled packages. The vulnerability undermines the trust boundary of network fetches in NLTK when proxies are used, potentially exposing sensitive internal resources to untrusted code.
Mitigation Recommendations
A patch is available that enforces refusal of proxied fetches when the egress destination cannot be validated, effectively blocking this SSRF bypass. Operators who trust their proxy can opt back in with environment variables (NLTK_ALLOW_PROXIED_URLOPEN=1) or flags, but the default behavior under ENFORCE mode is to block. Users should upgrade to a patched version (>=3.10.3) or apply the fix that disables unvalidated proxied fetches. Regression tests have been added to ensure this protection. Until patched, avoid relying on pathsec for SSRF protection in proxied environments or disable proxy usage.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-crp9-r7rq-c8cg
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-78682"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a8d9aeeacd9273b493e19c7
Added to database: 08/25/2026, 13:38:54 UTC
Last enriched: 09/18/2026, 02:16:46 UTC
Last updated: 10/09/2026, 06:48:19 UTC
Views: 75
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.