Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain write access to NLTK corpus directory
-
DeliveryPlant symlink targeting sensitive out-of-root file
-
ExploitInvoke corpus reader method (channels/domains/synonyms)
-
ExecutionBuilt-in open() follows symlink without restriction
-
ImpactSensitive file contents returned to attacker
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to have write access to at least one NLTK trusted corpus data root directory in order to stage a crafted symbolic link - this is the decisive prerequisite. This condition exists in shared or multi-tenant environments where corpus directories are group-writable, where an unprivileged process can populate corpus directories (e.g., automated corpus download pipelines with insufficient permission isolation), or where corpus data is sourced from an untrusted network location. Once the symlink is planted, exploitation is triggered simply by invoking the affected corpus reader methods (channels(), domains(), synonyms()) - no privileged user interaction is required at trigger time. Deployments where the NLTK corpus directory is owned exclusively by the NLTK service account and is not writable by any other user or process are not exploitable. The read-disclosure impact is bounded by what files the NLTK process user can access on the host filesystem. |
| Impact | The CVSS 4.0 score of 8.2 reflects high confidentiality impact with a network attack vector, but the AT:P (Attack Target: Presence) metric and AC:H signal that specific prerequisites - pre-staged symlinked corpus files - must be satisfied before exploitation can occur. No CISA KEV listing exists and no public exploit code has been identified, reducing urgency compared to a fully weaponized vulnerability at this score. EPSS data was not provided, leaving probabilistic exploitation frequency unquantified. Real-world risk scales directly with how exposed the corpus directory is: automated ML pipelines, shared academic clusters, or multi-tenant NLP platforms where corpus directories are writable by lower-privileged processes represent materially elevated risk. Single-user or tightly access-controlled deployments where the corpus directory is owned exclusively by the NLTK service account face substantially lower practical risk. The absence of active exploitation and the need for write-path access keep this below emergency priority for most operators, but the confidentiality impact is severe when prerequisites are met. |
| Exploit ScenarioDerived | An attacker with write access to a shared NLTK corpus directory - for example, a low-privileged user on a multi-tenant NLP research server - creates a symbolic link inside the corpus folder pointing to a sensitive file outside the root, such as an application secrets file or /etc/shadow. When a legitimate downstream process invokes a corpus reader method such as synonyms() on that corpus, NLTK's affected reader calls Python's built-in open() on the symlink path, transparently follows the link, and returns the target file's contents to the caller. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Path traversal via symlink bypass in NLTK corpus readers before 3.10.3 permits disclosure of arbitrary files outside the trusted corpus data root through standard API calls. Affected corpus reader methods - channels(), domains(), and synonyms() - reopen root-derived paths with Python's built-in open() rather than the secure nltk.pathsec.open(), which enforces symlink restrictions. An attacker who can stage symlinked files inside a trusted corpus directory can leverage this gap to read files the NLTK process can access on the host filesystem. No public exploit has been identified at time of analysis, and a vendor-released patch is available in NLTK 3.10.3.
RemediationAI
The primary remediation is to upgrade NLTK to version 3.10.3 or later, which corrects the affected corpus readers to use nltk.pathsec.open() consistently throughout; the vendor advisory is at https://github.com/nltk/nltk/security/advisories/GHSA-p4rw-rvv2-7xwr. Where immediate upgrade is not possible, restrict write permissions on all NLTK corpus data directories to only the trusted service account running NLTK, removing access for any untrusted users or processes - this eliminates the symlink staging prerequisite entirely. Operators running Linux can additionally mount corpus directories with the MS_NOSYMFOLLOW flag (mount option nosymfollow) or place NLTK in a container with a read-only bind-mounted corpus volume, preventing symlink traversal at the filesystem level regardless of NLTK's internal path handling. Auditing existing corpus directories for unexpected symbolic links should be performed as an immediate detective measure on any system where untrusted write access may have existed.
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 (Natural Language Toolkit), identified by CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*, is a foundational Python NLP library used widely in research and production language-processing pipelines. The vulnerability class is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal). NLTK provides a dedicated pathsec module with a custom open() wrapper that enforces trust boundaries, including symlink resolution checks, when reading corpus files. The flaw is that several corpus reader classes bypass this wrapper and call Python's built-in open() when reopening paths already derived from the trusted root. Because the built-in open() resolves symbolic links without restriction, a symlink planted inside the corpus directory can point to any file reachable by the NLTK process - including files well outside the intended corpus data root - and the reader methods will transparently return their contents.
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:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
PR:L reflects required write access to the corpus directory to stage symlinks; AC:H reflects the symlink pre-staging prerequisite; C:H and I:N/A:N match file-disclosure-only impact with no write or availability consequence.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.10.3 contain a path traversal vulnerability in corpus readers that reopen root-derived paths using built-in open() instead of nltk.pathsec.open(), allowing symlinks to escape trusted roots. Attackers who stage symlinked corpus files under a trusted data root can disclose outside-root content through normal corpus reader methods like channels(), domains(), and synonyms().
Blast Radius
ecosystem impact- 10 pypi packages depend on nltk (9 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.10.3.
Executive ViewAI
NLTK versions before 3.10.3 contain a path traversal vulnerability in corpus reader methods that could expose sensitive data and credentials if an attacker places symlinks within corpus directories. Organizations relying on NLTK for machine learning and NLP workloads should prioritize upgrading to mitigate the risk of unauthorized data access and potential compliance violations.
Apply vendor patch: upgrade to NLTK 3.10.3 or later.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
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
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
Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service
Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu
Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a
EUVD-2026-65526
GHSA-p4rw-rvv2-7xwr
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB