# CVE-2026-78682: NLTK pathsec SSRF bypass with HTTP proxy

Source: https://junglewise.ai/threats/cve-2026-78682-nltk-pathsec-ssrf-bypass-with-http-proxy  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-78682 · Severity: high · CVSS 7.5 · Published 2026-08-25

NLTK is a popular Python library for natural language processing that includes a security module (pathsec) designed to prevent applications from accidentally fetching data from internal or private networks. However, when an HTTP proxy is configured on the system, this protection can be circumvented—an attacker with network access to the proxy could trick NLTK into retrieving sensitive internal resources, forged package indexes, or malicious code archives that would normally be inaccessible. This is particularly dangerous for systems that rely on NLTK to safely download language datasets or packages from the internet.

Technologies: [nltk (PyPI)](https://junglewise.ai/threats/technologies/nltk). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-78682 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-78682 being exploited in the wild.

**How severe is CVE-2026-78682?** High severity, with a CVSS score of 7.5, published 25 August 2026.

**Which products and versions are affected?** nltk (PyPI) <= 3.10.2, ECOSYSTEM:introduced=0,fixed=3.10.3.

**Is there a fix for CVE-2026-78682?** Yes. nltk (PyPI): upgrade to 3.10.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-78682 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-78682?** Check whether you run nltk (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nltk (PyPI): upgrade to 3.10.3 or later

  ```sh
  pip install "nltk>=3.10.3"
  ```


## Technical details

This is a Server-Side Request Forgery (SSRF) vulnerability in the pathsec module's HTTP/HTTPS handling. The root cause is that `pathsec.urlopen()` validates the requested hostname and pins the destination IP for direct connections, but when proxy handlers are inherited from the global opener (via `ProxyHandler` instances), the `_SafeHTTPHandler` and `_SafeHTTPSHandler` security handlers are bypassed. This means the validated hostname no longer matches the actual egress destination—the proxy can redirect the validated request to any internal target. The vulnerability affects `nltk.pathsec.urlopen()`, `nltk.data.load()`, `nltk.downloader.Downloader.index()`, and `nltk.downloader.Downloader.download()`. An attacker requires the ability to configure or control a proxy on the target network (or via environment variables) and must set up a malicious proxy that redirects validated public URLs to internal services. Patch 3.10.3 introduces an `ENFORCE` mode (default enabled) that refuses proxied fetches entirely, with an opt-in escape hatch via `NLTK_ALLOW_PROXIED_URLOPEN=1` or `nltk.pathsec.ALLOW_PROXIED_FETCH=True` for operators who trust their proxy.

## Affected products

- NLTK Project NLTK <= 3.10.2

## Identifiers

- CVE-2026-78682
- GHSA-6ww7-3frv-cqxh
- PYSEC-2026-3733

## Timeline

- 2026-08-11: disclosed
- 2026-09-08: advisory
- 2026-09-08: patched: Patched in version 3.10.3

## References

- [https://api.github.com/users/sondt99](https://api.github.com/users/sondt99)
- [https://github.com/sondt99](https://github.com/sondt99)
- [https://api.github.com/users/sondt99/gists%7B/gist_id%7D](https://api.github.com/users/sondt99/gists%7B/gist_id%7D)
- [https://api.github.com/users/sondt99/repos](https://api.github.com/users/sondt99/repos)
- [https://avatars.githubusercontent.com/u/87920408?v=4](https://avatars.githubusercontent.com/u/87920408?v=4)
- [https://api.github.com/users/sondt99/events%7B/privacy%7D](https://api.github.com/users/sondt99/events%7B/privacy%7D)

## Related threats

- [NLTK WekaClassifier path traversal in model validation](https://junglewise.ai/threats/cve-2026-109956-nltk-through-3-10-3-contains-a-path-traversal-vulnerability-in)
- [NLTK RecursiveDescentParser uncontrolled recursion denial of service](https://junglewise.ai/threats/cve-2026-12876-nltk-recursivedescentparser-uncontrolled-recursion-denial-of)
- [NLTK tgrep regular expression denial of service](https://junglewise.ai/threats/nltk-tgrep-regular-expression-denial-of-service-02fca1b2)
- [NLTK Downloader hardlink filesystem containment bypass](https://junglewise.ai/threats/nltk-downloader-hardlink-filesystem-containment-bypass-522cb97d)
- [NLTK Pl196xCorpusReader quadratic ReDoS on malformed TEI blocks](https://junglewise.ai/threats/nltk-pl196xcorpusreader-quadratic-redos-on-malformed-tei-blocks-8473e6ef)
