NLTK 3.9.4 through 3.10.2 contains a path traversal vulnerability in CrubadanCorpusReader. (CVE-2026-71514)
NLTK versions 3.9.4 through 3.10.2 contain a path traversal vulnerability in the CrubadanCorpusReader component. This flaw allows an attacker who controls a corpus package to read files outside the intended corpus directory if the file path ends with -3grams.txt and the file contents are token count lines. The vulnerability arises because the code uses a standard open() call on a path constructed without proper containment checks, allowing escape from the corpus root directory.
AI Analysis
Technical Summary
The vulnerability in NLTK 3.9.4 through 3.10.2 is due to improper path validation in the CrubadanCorpusReader's _load_lang_ngrams function. It joins the corpus root path with a language code read from a mapping file and opens the resulting path using the builtin open() function instead of a pathsec-validated opener. This allows absolute paths to bypass the root containment check, enabling path traversal. An attacker controlling a corpus package can exploit this to disclose file contents outside the corpus root, limited to files ending with -3grams.txt that parse as token count lines.
Potential Impact
The vulnerability allows local attackers with control over a corpus package to read files outside the intended corpus directory, potentially disclosing sensitive information. The impact is limited to file disclosure (confidentiality) with no integrity or availability impact. The CVSS score is low (2.5) reflecting the limited scope and complexity of exploitation.
Mitigation Recommendations
No official patch or fix is currently documented. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using untrusted corpus packages or restrict corpus package sources to trusted providers to mitigate risk.
NLTK 3.9.4 through 3.10.2 contains a path traversal vulnerability in CrubadanCorpusReader. (CVE-2026-71514)
Description
NLTK versions 3.9.4 through 3.10.2 contain a path traversal vulnerability in the CrubadanCorpusReader component. This flaw allows an attacker who controls a corpus package to read files outside the intended corpus directory if the file path ends with -3grams.txt and the file contents are token count lines. The vulnerability arises because the code uses a standard open() call on a path constructed without proper containment checks, allowing escape from the corpus root directory.
CVSS v3.1
Score 2.5low
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 in NLTK 3.9.4 through 3.10.2 is due to improper path validation in the CrubadanCorpusReader's _load_lang_ngrams function. It joins the corpus root path with a language code read from a mapping file and opens the resulting path using the builtin open() function instead of a pathsec-validated opener. This allows absolute paths to bypass the root containment check, enabling path traversal. An attacker controlling a corpus package can exploit this to disclose file contents outside the corpus root, limited to files ending with -3grams.txt that parse as token count lines.
Potential Impact
The vulnerability allows local attackers with control over a corpus package to read files outside the intended corpus directory, potentially disclosing sensitive information. The impact is limited to file disclosure (confidentiality) with no integrity or availability impact. The CVSS score is low (2.5) reflecting the limited scope and complexity of exploitation.
Mitigation Recommendations
No official patch or fix is currently documented. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using untrusted corpus packages or restrict corpus package sources to trusted providers to mitigate risk.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-cv22-g7mw-8v73
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-71514"]
- Ecosystems
- []
- Database Specific Severity
- LOW
- Cvss Version
- 3.1
Threat ID: 6a8a27f7acd9273b499bc99a
Added to database: 08/22/2026, 22:51:35 UTC
Last enriched: 08/22/2026, 22:53:11 UTC
Last updated: 08/23/2026, 01:45:40 UTC
Views: 4
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.