# CVE-2026-79674: NLTK corpus reader sandbox bypass

Source: https://junglewise.ai/threats/cve-2026-79674-nltk-corpus-reader-sandbox-bypass  
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-79674 · Severity: high · CVSS 8.2 · Published 2026-08-25

NLTK is a popular Python natural language processing library that implements a filesystem sandbox (pathsec) to restrict corpus readers to a designated data directory. However, certain corpus reader constructors bypass this sandbox check, allowing callers to read files and SQLite databases from anywhere on the filesystem. An attacker who supplies a specially crafted corpus path can exfiltrate sensitive data outside the intended sandbox boundary.

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

## Quick answers

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

**How severe is CVE-2026-79674?** High severity, with a CVSS score of 8.2, 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-79674?** 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-79674 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-79674?** 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 path sandbox bypass vulnerability in NLTK's corpus reader API. The root cause is in CorpusReader.__init__(), which converts a raw string root path into a FileSystemPathPointer without validating it against the pathsec sandbox. Subclasses like LinThesaurusCorpusReader and PanLexLiteCorpusReader then use builtin open() or sqlite3.connect() directly on paths derived from this unvalidated pointer, bypassing the guard enforcement in pathsec.open(). No authentication or special privileges are required—any caller who can instantiate these readers with an attacker-controlled root path can read arbitrary files and query SQLite databases on the filesystem. The fix is to validate string roots through the pathsec API before constructing PathPointer objects, and to route all file/database access through pathsec.open() rather than calling builtin open() directly.

## Affected products

- NLTK Project NLTK <= 3.10.2

## Identifiers

- CVE-2026-79674
- GHSA-3gq4-3j92-5w49
- PYSEC-2026-3736

## Timeline

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

## References

- [https://api.github.com/users/nguyencanhthuong](https://api.github.com/users/nguyencanhthuong)
- [https://github.com/nguyencanhthuong](https://github.com/nguyencanhthuong)
- [https://api.github.com/users/nguyencanhthuong/gists%7B/gist_id%7D](https://api.github.com/users/nguyencanhthuong/gists%7B/gist_id%7D)
- [https://api.github.com/users/nguyencanhthuong/repos](https://api.github.com/users/nguyencanhthuong/repos)
- [https://avatars.githubusercontent.com/u/107567921?v=4](https://avatars.githubusercontent.com/u/107567921?v=4)
- [https://api.github.com/users/nguyencanhthuong/events%7B/privacy%7D](https://api.github.com/users/nguyencanhthuong/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)
