Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver attacker-controlled YCOE corpus into an allowlisted data root
-
DeliveryPlant psd/pos entries as directory symlinks
-
ExploitYCOECorpusReader.join() returns pointer after lexical-only check
-
ExecutionCorpusReader.__init__ validates without required_root, accepts escaped target
-
PersistNested sub-reader root now points outside corpus root
-
Impactparsed_sents()/tagged_words() return out-of-root file content
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 POSIX host (directory symlinks), pathsec.ENFORCE=True (the default in affected 3.10.0-3.10.3 releases), and attacker control over the directory contents of a YCOE corpus that the victim application loads under an allowlisted NLTK data root - specifically the ability to plant the corpus's 'psd' and 'pos' entries as directory symlinks pointing at another in-sandbox location. The victim must then invoke YCOECorpusReader methods such as parsed_sents(), tagged_words(), tagged_sents(), or words(). Limiting factors: disclosure is read-only and strictly bounded to the allowed NLTK data sandbox (a symlink whose target resolves outside every allowed root is rejected at construction with PermissionError, so this is not arbitrary-filesystem read); there is no integrity or availability impact; and the attacker must successfully deliver or plant a malicious corpus that the victim loads. On 3.9.4, ENFORCE defaults to False, so the per-corpus-root control this report concerns is not active by default there. |
| Impact | The input CVSS 4.0 base score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H) frames this as a high-severity, network, unauthenticated information-disclosure flaw, but the detailed GHSA evidence shows the practical risk is materially narrower than that vector implies. Exploitation is not opportunistic remote access: it requires the attacker to control the directory contents of a YCOE corpus that a victim application actually loads under pathsec.ENFORCE=True on a POSIX host, and the disclosure is bounded to the allowed NLTK data sandbox (a symlink resolving outside every allowed root is rejected at construction with PermissionError), so this is cross-corpus-root read, not arbitrary-filesystem read. There is no EPSS score and no CISA KEV listing in the input, so there is no evidence of active or widespread exploitation; the vuln.today Decision label is this_week, not act_now or emergency. A working proof-of-concept is embedded in the GHSA advisory (output shows 'ESCAPE CONFIRMED'), which raises reproducibility, but PoC availability is distinct from in-the-wild exploitation. Net: a genuine, VulnCheck-reported disclosure bug worth remediating on a this-week cadence, but the AV:N/PR:N/UI:N vector overstates real exposure because it omits the precondition that the victim must load an attacker-controlled corpus; the real risk concentrates in multi-tenant or automated-corpus-ingestion deployments. Note also a data conflict: top-level metadata says a patch is available / fixed in 3.10.4, while the GHSA advisory body states the reader is 'not fixed' - this should be verified with the vendor before relying on an upgrade. |
| Exploit ScenarioDerived | In a multi-tenant or automated-ingestion NLTK deployment, an attacker supplies a YCOE corpus whose 'psd' and 'pos' entries are directory symlinks pointing at another directory inside the allowed NLTK data root (for example another tenant's corpus or the shared system temp directory). When the victim application constructs YCOECorpusReader on that corpus and calls parsed_sents() or tagged_words(), it returns file content from outside the corpus root but inside the sandbox, yielding read-only cross-corpus-root disclosure. A working PoC demonstrating the escape against published PyPI sdists (3.10.0 and 3.10.3) is included in the GHSA advisory; with AV:N/AC:L the mechanics are simple once the attacker can place a corpus the victim loads. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Cross-corpus information disclosure in NLTK's YCOECorpusReader (3.10.0 through 3.10.3) lets an attacker who controls a YCOE corpus's directory contents plant 'psd' or 'pos' directory symlinks so that parsed_sents(), tagged_words(), tagged_sents() and words() return file content from outside the YCOE corpus root. The escape is read-only and bounded to the allowed NLTK data sandbox - a symlink whose target resolves outside every allowed root is rejected at construction with PermissionError - but on shared or multi-tenant ingestion hosts the reachable scope includes other corpora under the shared data path and the shared system temporary directory, which is an allowed root by default. A public proof-of-concept reproduction against the published 3.10.0 and 3.10.3 sdists accompanies the GHSA advisory; no CISA KEV listing or confirmed active exploitation was provided. The vendor's CVSS 4.0 base of 8.7 describes an unauthenticated network flaw, whereas the assessed vector requires user interaction in that the victim application must load the attacker-supplied corpus and invoke the reader, and a fix is shipped in 3.10.4.
RemediationAI
Upgrade nltk to 3.10.4, the vendor-released fix, per the GHSA advisory at https://github.com/nltk/nltk/security/advisories/GHSA-qg35-44qx-7vrr. If the upgrade cannot be applied immediately, the effective compensating control is to treat YCOE corpora as untrusted input at the filesystem level: before constructing YCOECorpusReader, reject any corpus whose 'psd' or 'pos' entries are symlinks or whose realpath escapes the corpus root (for example by comparing os.path.realpath against the corpus root as the advisory's recommended validate_path(..., required_root=self.root) check would), since the reader itself performs no such resolution at construction and a real-directory negative control stays contained; the trade-off is that legitimate corpora distributed with symlinked layout components will be refused and must be materialized as real directories. Additionally, avoid loading downloaded, shared or otherwise attacker-influenced YCOE corpora entirely, and, where the deployment allows it, narrow nltk.data.path so the shared system temporary directory is not an allowed root - accepting that this is a default allowed root many workloads rely on and that rebinding it can break corpus and resource lookups that resolve through temp paths. Note that on 3.9.4 the pathsec per-corpus-root enforcement is off by default, so enabling ENFORCE there does not by itself close this nested-reader gap; the patched reader in 3.10.4 remains the complete fix.
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
NLTK 3.10.x ships pathsec, a containment layer intended to confine each corpus reader to its own corpus root (validate_path(..., required_root=...) at read time) on top of a global sandbox check against nltk.data.path; ENFORCE defaults to True in this line (3.9.4 ships ENFORCE=False, so that per-root control is not active there by default). This is a CWE-59 link-following defect in the construction of nested sub-readers. YCOECorpusReader.__init__ derives two nested reader roots from self.root.join("psd") and self.root.join("pos"); FileSystemPathPointer.join() in nltk/data.py performs only a lexical containment test (relative to an os.path.abspath root, using normpath and a prefix comparison) and never calls resolve(), so a directory symlink named psd or pos satisfies the check. CorpusReader.__init__ then validates the resulting sub-reader root by calling validate_path without required_root, which skips the scoped per-corpus-root layer and runs only the global sandbox layer; that layer resolves the symlink, finds the target inside an allowed root, and accepts the sub-reader with its root anchored at the escaped location. Because the read-time guard validate_path(path, required_root=self._root) and find_corpus_fileids' realpath/commonpath descent check both operate against the sub-reader's own already-escaped root, no later check re-anchors the read to the YCOE corpus root. The trigger requires a POSIX host (directory symlinks), ENFORCE at its default True, and attacker control of the corpus directory contents; the advisory states no fix commit touching nltk/corpus/reader/ycoe.py existed at review time and recommends validating each nested root against the parent corpus root.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Exploitation hinges on the victim loading an attacker-controlled corpus (UI:R); disclosure is read-only and bounded to the NLTK data sandbox, so C:H with I:N and A:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK from 3.10.0 before 3.10.4 contains a symlink escape vulnerability in YCOECorpusReader that allows attackers to read files outside the corpus root by planting psd or pos directory symlinks. Attackers controlling a YCOE corpus can make parsed_sents() and tagged_words() return file content from other corpora or temporary files within the NLTK data sandbox.
Blast Radius
ecosystem impact- 6 pypi packages depend on nltk (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Articles & Coverage 1
Technical POC Analysis
CWE-59 (Improper Link Resolution Before File Access).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity vulnerability in NLTK versions 3.10.0 through 3.10.3 allows an attacker to read files outside a corpus root by planting symbolic links in YCOE corpus data. Organizations using NLTK for natural language processing on shared or multi-tenant hosts are affected, where an attacker could potentially access other corpora or temporary files. Leadership should prioritize patching because the flaw enables information disclosure and a public proof-of-concept exists, increasing the risk of exploitation.
Apply vendor patch.
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-125216
GHSA-7r4r-6ppg-7ff8
NVD
CVE.org
EPSS
Exploit-DB