Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted corpus root path via API
-
DeliveryApplication forwards path to LinThesaurusCorpusReader or PanLexLiteCorpusReader
-
ExploitPathsec sandbox boundary bypassed
-
ExecutionArbitrary file or SQLite database opened
-
ImpactSensitive content returned to attacker
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
|
| Exploitation Conditions | Exploitation requires that the calling application pass externally controlled input as the corpus root path argument to LinThesaurusCorpusReader or PanLexLiteCorpusReader; NLTK corpus readers that do not accept external root paths, or applications that hardcode the corpus root to a fixed value, are not exploitable via this vulnerability. The CVSS 4.0 vector (PR:N/UI:N/AV:N) applies only to deployments where these constructors are reachable from an untrusted network context - this is a non-default application design pattern requiring explicit exposure. Exploitation is bounded by the OS-level permissions of the NLTK process: only files readable by that process account can be accessed, and privilege escalation beyond the process's existing OS permissions is not described. The pathsec bypass targets specifically the two named constructors; other NLTK components are not described as affected. |
| Impact | The CVSS 4.0 score of 8.8 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N) reflects the worst-case scenario: a network-accessible application that exposes the affected constructors to unauthenticated user-supplied input. High confidentiality impact (VC:H) is well-supported by the ability to read arbitrary files and SQLite databases accessible to the NLTK process; the low integrity impact (VI:L) is not fully explained by the description, which emphasizes read access, and should be independently verified against the upstream advisory. EPSS data was not provided in the available intelligence, so exploitation probability cannot be quantified numerically. No active exploitation is confirmed - neither CISA KEV nor a public POC is present in the sourced data. Practically, NLTK is predominantly deployed in offline or internal data-science environments where corpus-reader constructors are not exposed to external input, which would significantly reduce real-world exploitability below what the raw CVSS score implies; however, any deployment embedding NLTK in a web API that accepts corpus path parameters without sanitization faces genuine high-severity risk. |
| Exploit ScenarioDerived | An attacker identifies a web API that accepts a corpus name or root path parameter and forwards it directly to PanLexLiteCorpusReader or LinThesaurusCorpusReader. By supplying a crafted path such as an absolute path to /etc/shadow or a relative traversal sequence targeting application configuration files or credential databases, the attacker causes NLTK to open and return content from outside the intended data directory. No public POC has been identified at time of analysis, but the attack requires no specialized tooling beyond a standard HTTP client capable of sending a crafted request. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Path traversal in NLTK before 3.10.3 exposes arbitrary filesystem content and SQLite databases by bypassing the library's pathsec sandbox boundary. The LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors accept caller-supplied corpus root paths without enforcing the intended data-root restriction, enabling CWE-73 (External Control of File Name or Path) exploitation wherever applications forward user-controlled input to these constructors. No public exploit or CISA KEV listing has been identified at time of analysis; real-world severity is highly dependent on whether the affected constructors are reachable from an untrusted network path in the deploying application.
RemediationAI
The primary fix is to upgrade NLTK to version 3.10.3 or later, which closes the pathsec sandbox bypass in the affected corpus-reader constructors; the vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-3gq4-3j92-5w49 confirms this release. For applications where an immediate upgrade is not feasible, remove any code path that forwards user-controlled strings as the corpus root argument to LinThesaurusCorpusReader or PanLexLiteCorpusReader; if dynamic corpus roots are a product requirement, enforce a strict allowlist of pre-approved absolute paths before passing values to these constructors. As a defense-in-depth measure, run the NLTK process under a dedicated low-privilege OS account and apply filesystem-level access controls - such as a container read-only mount or chroot - restricting accessible directories to only the intended NLTK data root, which limits the blast radius if exploitation occurs. Be aware that overly restrictive filesystem controls may break other NLTK corpus readers that legitimately require access to the data root.
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) is a Python platform for human language data processing, widely used in NLP research and data-science pipelines. The vulnerability is localized to two corpus-reader classes - LinThesaurusCorpusReader, which reads Lin's distributional thesaurus data, and PanLexLiteCorpusReader, which accesses a PanLex Lite SQLite database - both of which accept a root directory path as a constructor argument. NLTK implements a pathsec sandbox mechanism intended to confine corpus file access to a designated data root; CWE-73 (External Control of File Name or Path) describes the root cause: neither constructor validates or sanitizes the caller-supplied root before using it in filesystem operations, so the sandbox boundary can be bypassed by supplying an arbitrary absolute path or a path-traversal sequence. The affected scope covers all NLTK releases matching CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* prior to version 3.10.3.
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:L/VA:N/SC:N/SI:N/SA:N
Network vector and no privileges reflect web-API exposure of the constructors; S:U because exploitation stays within the process boundary with no scope change to other systems.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
Executive ViewAI
NLTK (Natural Language Toolkit) versions prior to 3.10.3 contain a path traversal vulnerability (CVSS 8.8) that could expose sensitive files and databases if applications pass user-controlled input to corpus constructors. Organizations running NLTK in production face data exposure risk, particularly if these components are accessible from untrusted networks. With no vendor patch available, risk mitigation depends on immediate inventory, input validation controls, and upgrade planning.
No vendor-released patch identified at time of analysis. Implement strict input validation to restrict user-supplied corpus paths to whitelisted directories; isolate NLTK components from direct network access and untrusted users; apply network segmentation for systems processing sensitive data; monitor NLTK releases and stage version 3.10.3 or later for immediate deployment upon availability; audit application logs for anomalous file access patterns if these constructors are in-scope.
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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-65524
GHSA-3gq4-3j92-5w49
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB