Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local account or supply untrusted corpus
-
ExploitPlant intermediate-directory symlink inside corpus root
-
ExecutionInvoke view method words()/sents()/abspaths() on crafted fileid
-
ImpactRead and disclose out-of-root file contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Requires a LOCAL principal who can create an intermediate-directory symlink inside an NLTK corpus root (e.g. any account that loads NLTK corpora, or an attacker supplying an untrusted corpus in a supply-chain/web-service loading model) and who then invokes a corpus-reader view method (PlaintextCorpusReader.words/sents/paras, SyntaxCorpusReader.parsed_sents/tagged_sents/sents/tagged_words/words) or abspaths()/abspath() with a crafted relative fileid; the hardened open() entry point is NOT affected. Limiting factors: there is no remote vector (AV:L) and the attacker needs local write access within the corpus root plus some privilege (PR:L); on releases with pathsec enforcement (3.10.x) the disclosed file must still lie inside a global NLTK allowed root, bounding what can be read, whereas 3.9.4 ships pathsec.ENFORCE=False and permits a broader escape beyond the allowed roots. No victim user interaction is required. |
| Impact | The available signals are largely consistent and point to a genuine but bounded, lower-urgency issue rather than a top-tier emergency. The provided CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, base 5.5) describes a local, low-privilege, confidentiality-only information disclosure, matching the vuln.today decision label of 'this_month' (not act_now/emergency). The CWE-59 improper link-resolution root cause and the local attack vector mean exploitation requires an attacker who already has a local account (or can supply an untrusted corpus) and can create a symlink inside a corpus root, which sharply narrows real-world risk despite the C:H confidentiality rating. No CISA KEV listing is present in the input, so this is NOT confirmed actively exploited, and no EPSS score was supplied, so widespread-exploitation probability cannot be quantified from the data. A detailed, self-checking PoC is embedded in the GHSA advisory and was dynamically reproduced against 3.9.4, 3.10.3 and master, so a public PoC reference exists even though the input does not label it as confirmed distributable working exploit code. Net: real and worth patching within the month, but a local confidentiality bug with meaningful preconditions, not a remotely wormable critical. |
| Exploit ScenarioDerived | On a multi-user host, or a service that loads untrusted/attacker-supplied corpora, an attacker places an intermediate-directory symlink inside an NLTK corpus root pointing at a sibling location, then calls a view method such as PlaintextCorpusReader.words(['sub/secret.txt']) or abspaths(); because these methods skip the scoped-root guard that open() enforces, the symlink is followed and the out-of-root file's contents are returned. A detailed PoC reference exists in the advisory and was reproduced on 3.9.4/3.10.3/master; being local (AV:L) and low-complexity (AC:L), it is reliable once the attacker can write a symlink into the corpus directory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Local information disclosure in NLTK 3.9.4 through 3.10.3: the corpus-reader view methods (PlaintextCorpusReader.words/sents/paras and SyntaxCorpusReader.parsed_sents/tagged_sents/sents/tagged_words/words) and abspath()/abspaths() open file pointers through pathsec.open() with required_root unset, so only the lexical join and the global NLTK allowed-roots check apply, while the hardened CorpusReader.open() path additionally enforces the scoped corpus root. A local, low-privileged attacker (CVSS PR:L) who can create an intermediate-directory symlink inside a corpus root and then invoke a view method or abspaths() with a crafted relative fileid can read the contents of a file that lies outside the corpus root - on 3.10.x the target must still sit inside a global NLTK allowed root, but 3.9.4 ships pathsec.ENFORCE=False and permits a broader escape. The advisory ships a self-checking reproduction script that was dynamically confirmed on 3.9.4, 3.10.3 and master; it is not listed as confirmed active exploitation (no CISA KEV entry), and in the reproduction the identical fileid is refused by reader.open() but read successfully through the view-method channel.
RemediationAI
Vendor-released patch: upgrade to nltk 3.10.4, which routes abspath()/abspaths() through a new _guard_fileid() helper that calls validate_path(path, context='CorpusReader', required_root=self._root) before returning the pointer, closing the view-method channel (PR https://github.com/nltk/nltk/pull/3761, commit 9f7cf06b4af4ca5c65381ed0abc17e989dc54400, release https://github.com/nltk/nltk/releases/tag/v3.10.4; advisory https://github.com/nltk/nltk/security/advisories/GHSA-g58v-j9g9-5gfg). Where upgrading is not immediately possible, the evidence shows CorpusReader.open() is not affected - it refuses the same fileid with 'Security Violation [CorpusReader]: Path ... escapes root ...' - so callers that only read plaintext or parsed corpora can open fileids through reader.open() and tokenize/parse the resulting stream themselves instead of calling words()/sents()/paras()/parsed_sents()/tagged_sents(), at the cost of losing the incremental StreamBackedCorpusView behaviour and reimplementing the reader's tokenisation; abspaths()/abspath() pointers should likewise be treated as untrusted. Because the attack requires planting an intermediate directory symlink inside the corpus root, ensuring corpus roots are not writable by untrusted principals and not loading corpora whose directory trees contain unexpected symlinks removes the prerequisite - with the caveat that on 3.9.4 pathsec enforcement is disabled entirely, so the allowed-roots boundary must not be relied on for containment until 3.10.4 is installed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is CWE-59 (improper link resolution before file access) with a path-traversal flavour, caused by two sibling file-access channels on the same CorpusReader disagreeing about the sandbox. The guarded channel, CorpusReader.open() (nltk/corpus/reader/api.py:235-257), applies a lexical guard rejecting absolute paths and '..' and then calls nltk.pathsec.validate_path(..., required_root=self._root), whose scoped branch resolves the target with Path(raw).resolve() and raises ValueError when the result is not relative to the corpus root. The unguarded channel is abspath()/abspaths(), which only performs self._root.join(fileid); FileSystemPathPointer.join() normalises lexically (normpath plus root-prefix startswith) without realpath/Path.resolve, so an intermediate directory symlink survives verbatim, and FileSystemPathPointer.open() calls pathsec.open(raw_path, 'rb') with required_root left at its default None. That means only the global allowed-roots check runs, and although _hardened_open uses O_NOFOLLOW plus a post-open fd realpath re-validation, O_NOFOLLOW only refuses a symlink in the final path component, so an intermediate directory symlink such as corpus/sub -> <other allowed root> is followed by the kernel. The view methods (plaintext.py:67-118 and 230, api.py:473-519) feed these unguarded pointers into StreamBackedCorpusView, which simply calls pointer.open(). On 3.9.4 the same abspaths()/view-method code path exists but pathsec.ENFORCE is False and pathsec.open is a thin builtins.open wrapper with no _hardened_open/O_NOFOLLOW, so even the global allowed-roots boundary is not enforced and the escape is broader; existing regression tests cover only the open()/validate_path(required_root=...) path and not the view-method channel.
Know when Nltk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Local symlink placement by a low-privileged account (AV:L/PR:L), no user interaction, straightforward trigger (AC:L); confidentiality-only file disclosure so C:H, I:N, A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.9.4 until 3.10.4, NLTK corpus-reader path pointers and view methods validate a requested relative path without consistently resolving intermediate directory symlinks against the reader's scoped root. A local attacker who can place such a symlink can make abspaths or words reach a readable file outside the corpus root and disclose its contents. On releases with pathsec enforcement, the file must remain inside a global NLTK allowed root; version 3.9.4 has enforcement disabled and permits a broader escape. This issue is fixed in version 3.10.4.
Blast Radius
ecosystem impact- 193 pypi packages depend on nltk (46 direct, 147 indirect)
Ecosystem-wide dependent count for version 3.9.4.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc
Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to
CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin
CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot
Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f
Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca
Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers
Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse
XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s
EUVD-2026-130493
GHSA-g58v-j9g9-5gfg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB