Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify NLTK application accepting user-supplied resource identifiers
-
DeliveryCraft file:// URL targeting sensitive file
-
ExploitSubmit URL via authenticated application interface
-
Executionnltk.data.load() instantiates FileSystemPathPointer
-
PersistSelf-comparison sandbox check passes unconditionally
-
ImpactSensitive file contents returned to attacker
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Access control enforcement
MITRE ATT&CK
1 technique across 1 tactic: Defense Evasion The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the attacker can control or influence the string argument passed to nltk.data.load(), and that the application uses a version of NLTK earlier than 3.10.0. The most common at-risk configuration is an application or API endpoint that accepts user-supplied resource names, corpus identifiers, or model paths and forwards them to NLTK data loading without validating or allowlisting the value. The file:// URL scheme must be accepted by the application's invocation path; in default NLTK usage this scheme is valid. The CVSS PR:L rating confirms that some level of authenticated or authorized access is required - purely unauthenticated, zero-touch exploitation is not indicated. Exploitation is limited to reading files accessible to the OS account running the NLTK process; files owned by root with restrictive permissions would not be readable unless the process runs as root. No special NLTK configuration, non-default settings, or specific platform is required beyond using an affected version with user-controlled input reaching nltk.data.load(). |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N) accurately captures the threat profile: network-reachable, low complexity, no attack requirements, but requiring some level of prior access (PR:L). The high confidentiality impact (VC:H) with no integrity or availability impact is consistent with a pure read primitive. The PR:L constraint is the primary limiting factor - exploitation requires the ability to influence what string is passed to nltk.data.load(), which in practice means the attacker either has authenticated access to an application using NLTK or the application exposes an interface that passes user input to this function without sanitization. The absence of a CISA KEV listing and the lack of noted public exploit code reduce urgency relative to a fully unauthenticated, weaponized flaw, but the self-comparison bug is so straightforward that exploit development would be trivial for any researcher with NLTK familiarity. EPSS data was not provided in the input; risk should be treated as moderate-to-high for any deployment where NLTK data loading accepts external or user-controlled identifiers. Impact is confined to confidentiality - no write or destructive capability is exposed. |
| Exploit ScenarioDerived | An attacker with authenticated access to a web application that uses NLTK for text processing submits a crafted file:// URL - such as file:///etc/passwd or file:///app/.env - as a resource identifier to an endpoint that internally calls nltk.data.load() with the user-supplied value. FileSystemPathPointer.open() invokes its sandbox check, which compares the normalized path against itself (always True), silently passes, and returns the file contents to the application, which may then echo them in an error message or API response. No public exploit code has been identified at time of analysis, but the logic defect requires no heap spray, memory corruption, or race condition - only a valid file:// URL pointing to a readable file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 22, 2026
Arbitrary file read in NLTK before 3.10.0 stems from a logic defect in FileSystemPathPointer.open() where the sandbox path validation compares a normalized path against itself, rendering the security boundary permanently non-functional rather than conditionally bypassable. Authenticated attackers who can influence calls to nltk.data.load() - for example, via an application that accepts user-supplied resource identifiers - can supply file:// URLs to exfiltrate any file accessible to the process account, including credentials, environment files, and application configuration. No active exploitation has been confirmed (not in CISA KEV), and no public exploit code is identified at time of analysis; however, the trivially exploitable nature of the tautological check warrants prompt patching.
RemediationAI
The primary fix is to upgrade NLTK to version 3.10.0 or later, which corrects the self-comparison logic in FileSystemPathPointer.open() so that the sandbox check validates the requested path against the actual sandbox root directory. Upgrade via pip using 'pip install --upgrade nltk>=3.10.0'. The vendor advisory is at https://github.com/nltk/nltk/security/advisories/GHSA-72r2-7mfr-5xr9. If immediate patching is not possible, the most effective compensating control is to audit all application code paths that invoke nltk.data.load() and ensure that the resource identifier argument is never derived from untrusted or user-supplied input - enforce an allowlist of permitted corpus names or paths before passing values to NLTK. Additionally, running the NLTK process under a dedicated, minimally privileged OS account will limit what files can be read even if exploitation occurs, since the vulnerability only exposes files accessible to the process user. If the application does not legitimately require file:// URL support in nltk.data.load(), input validation rejecting the file:// scheme at the application layer is a viable short-term workaround with minimal functional impact for most deployments.
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, CPE: cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*) is a widely used Python library for NLP and computational linguistics research. Its data-loading subsystem uses a PathPointer abstraction; FileSystemPathPointer.open() is responsible for opening corpus and model files while enforcing a sandbox restriction to prevent path traversal. The root cause is CWE-284 (Improper Access Control): the validation logic normalizes the requested path and then tests whether it starts with itself - an expression that is always True regardless of the actual path requested. The file:// URL scheme is accepted by nltk.data.load() as a valid locator, giving attackers a direct mechanism to construct absolute paths to sensitive files. This class of logic bug (self-comparison) is distinct from a missing check - it creates a permanently open gate masquerading as a functioning control, which may explain why the defect survived code review. All NLTK versions from 0 up to (but not including) 3.10.0 are affected.
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:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Network-reachable file read requiring low-privilege application access; no integrity or availability impact; scope unchanged.
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.10.0 contain a logic bug in FileSystemPathPointer.open() where the sandbox validation check compares a normalized path against itself, making the security check permanently inert. Attackers can pass file:// URLs to nltk.data.load() to read arbitrary files accessible to the process user, including credentials and configuration files.
Blast Radius
ecosystem impact- 6 pypi packages depend on nltk (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
NLTK, a widely-used data processing library, contains a file access vulnerability that allows authenticated attackers to read sensitive files including credentials and configuration data. Organizations using NLTK in applications that accept user-supplied resource identifiers face risk of unauthorized access to system secrets and potential lateral movement within infrastructure.
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
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 through version 3.10.3 allows attackers who control caller-supplied file paths to read or write f
Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated
EUVD-2026-64309
GHSA-72r2-7mfr-5xr9
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB