NLTK: Corpus Reader Sandbox Bypass
NLTK can let an attacker read local files an application meant to keep private. The attacker must control which data folder the application gives NLTK.
- Severity
- HighCVSS 3.1 · 8.2
- Fix
- Fixed in 3.10.3
- Affected versions
- before 3.10.3
- Weakness
- CWE-73
- Exploit likelihood
- 0.23% in 30 daysEPSS, higher than 13% of known flaws
- Affects
- NLTK
How it works
- An application must accept an untrusted data folder location for NLTK.
- Affected versions convert that location before checking whether it is allowed.
- Two affected readers then open the chosen text file or SQLite database directly.
- This lets the application read files outside NLTK's permitted folders.
What to do
Run python3 -m pip show nltk in every application environment. Version 3.10.2 or earlier is affected. Finding that version does not prove exploitation. Exposure requires an untrusted caller to control the data folder location.
Run this in the application environment you want to check:
python3 -m pip show nltkUpgrade NLTK to version 3.10.3 or later in every application environment. Rerun the version check and confirm it reports 3.10.3 or newer.
Technical details
CVE-2026-79674 affects NLTK corpus-reader constructors through version 3.10.2. LinThesaurusCorpusReader and PanLexLiteCorpusReader can accept caller-controlled root paths and read local text files or SQLite databases outside the pathsec sandbox. Version 3.10.3 validates reader roots before file access. It also checks the PanLex Lite database location before opening it.
Severity breakdown
- Attack vector Network Requires network access to the vulnerable service
- Attack complexity Low Low complexity under the assessed conditions
- Privileges required None Attacker needs no account or login
- User interaction None No victim action needed
- Scope Unchanged Impact stays within the same security authority
- Confidentiality impact High Sensitive data can be exposed with serious impact
- Integrity impact Low Some data can be modified
- Availability impact None No availability impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N Open in FIRST.org calculatorReferences
- github.com · v3.10.3 (tag) vendor advisory patch release notes
- github.com · commit bc00720 vendor advisory GitHub Advisory
- github.com · GHSA-3gq4-3j92-5w49 vendor-advisory vendor advisory
- cve.org · CVERecord vdb entry
- nvd.nist.gov · CVE-2026-79674 us government resource vdb entry
- github.com · PYSEC-2026-3736.yaml (main) vendor advisory GitHub Advisory
- tenable.com · CVE-2026-79674 third party advisory vdb entry
- cvefeed.io · CVE-2026-79674 third party advisory vdb entry
- osv.dev · CVE-2026-79674 vdb entry
- euvd.enisa.europa.eu · EUVD-2026-65524 vdb entry
- cveawg.mitre.org · CVE-2026-79674
- vulncheck.com · nltk-path-traversal-via-corpus-reader-constructors third-party-advisory GitHub Advisory