Severity by source
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Local vector and high complexity reflect mandatory corpus supply-chain control; no-privilege attacker requires user interaction to trigger corpus load; low confidentiality with no integrity or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2Blast Radius
ecosystem impact- 181 pypi packages depend on nltk (40 direct, 141 indirect)
Ecosystem-wide dependent count for version 3.9.4.
DescriptionCVE.org
NLTK 3.9.4 through 3.10.2 contains a path traversal vulnerability in CrubadanCorpusReader. _load_lang_ngrams joins the corpus root with crubadan_code, the column-0 value read from the corpus table.txt mapping file, and opens the result with the builtin open() rather than the pathsec-validated opener, so os.path.join discards the root when that value is absolute and the read escapes the corpus directory without the containment check nltk.pathsec applies when ENFORCE is set. An attacker who controls a corpus package can disclose file contents outside the corpus root through lang_freq, limited to paths ending in -3grams.txt whose contents parse as token count lines.
AnalysisAI
Path traversal in NLTK's CrubadanCorpusReader (versions 3.9.4 through 3.10.2) allows an attacker who controls a malicious corpus package to read arbitrary file contents outside the corpus root directory via the lang_freq interface. The vulnerability arises because _load_lang_ngrams bypasses NLTK's pathsec containment by calling the builtin open() instead of the pathsec-validated opener, enabling os.path.join to silently discard the corpus root prefix when an absolute path is supplied as the crubadan_code value. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Exploitation requires that the attacker control the content of a Crubadan corpus package loaded by NLTK, specifically the table.txt mapping file, and be able to insert an absolute path as the crubadan_code (column-0) value. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The CVSS 4.0 score of 2.0 with vector AV:L/AC:H/AT:P/PR:N/UI:P accurately reflects the narrow exploitation window: exploitation requires local access, high attack complexity, specific attack prerequisites (attacker control over a loaded corpus package), and passive user interaction. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | Full exploit scenario with step-by-step reproduction available after sign-in. |
| Remediation | Upgrade NLTK to version 3.10.3 or later, which patches the vulnerability by replacing all affected open() calls with pathsec_open() and adding required_root enforcement across CrubadanCorpusReader, IPIPANCorpusReader, LinThesaurusCorpusReader, MTEFileReader, and the ACE file loader. … Detailed patch versions, workarounds, and compensating controls in full report. |
Threat intelligence, references, and detailed analysis are available after sign-in.
Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a
nltk is vulnerable to Inefficient Regular Expression Complexity. Rated high severity (CVSS 7.5), this vulnerability is r
NLTK Downloader before 3.4.5 is vulnerable to a directory traversal, allowing attackers to write arbitrary files via a .
Remote code execution in NLTK (Natural Language Toolkit) versions ≤3.9.2 allows unauthenticated attackers to execute arb
Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p
Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic
Argument injection in the Natural Language Toolkit (NLTK) Python library before 3.10.3 allows attackers who control the
Arbitrary code injection in the Natural Language Toolkit (NLTK) before 3.9.3 stems from the downloader module extracting
Remote code execution in NLTK's TransitionParser component allows arbitrary OS command execution when a victim loads a c
Path traversal in NLTK before 3.10.3 exposes arbitrary filesystem content and SQLite databases by bypassing the library'
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-64295
GHSA-cv22-g7mw-8v73