Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify web endpoint accepting user-supplied fileid for NLTK corpus loading
-
DeliverySubmit crafted file path (e.g., /etc/passwd or app secrets file) as fileid
-
ExploitStreamBackedCorpusView invokes builtins.open() directly
-
Executionpathsec.ENFORCE boundary bypassed silently
-
PersistArbitrary local file contents returned in application response
-
ImpactExfiltrate credentials or sensitive configuration data
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 that the consuming application passes attacker-controlled or externally influenced values to the fileid argument of StreamBackedCorpusView without application-layer path validation or allowlisting. The bypass is unconditional at the library level for all NLTK versions before 3.10.0 - pathsec.ENFORCE configuration does not matter. Exploitation is therefore limited to deployments where user input reaches this parameter, such as web APIs, corpus browsers, or NLP pipelines that accept dynamic file identifiers from external sources. Authentication requirements are determined entirely by how the consuming application gates access to the vulnerable endpoint, not by NLTK itself; the CVSS 4.0 vector's PR:N reflects no privilege requirement at the library layer. Offline or batch NLTK usage with no external fileid exposure is not exploitable. |
| Impact | The CVSS 4.0 base score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N/VC:H reflects the high confidentiality impact assuming a network-accessible NLTK deployment where user input reaches the fileid argument - the official scoring treats no specific attack requirement as necessary. In practice, real-world exploitability is conditional on that specific application usage pattern: an NLP inference API, corpus browsing service, or text-processing pipeline that forwards user-supplied identifiers to StreamBackedCorpusView is directly at risk, while offline batch processing that never exposes fileid to external input is not. No active exploitation has been confirmed by CISA KEV, and no public POC code has been identified at time of analysis, reducing urgency compared to similarly scored vulnerabilities with confirmed in-the-wild exploitation. EPSS data was absent from the source intelligence; prioritization should weight deployment pattern specificity and whether applications in scope pass external input to fileid rather than relying on the raw score alone. |
| Exploit ScenarioDerived | An attacker targeting a web service that accepts a corpus file identifier from user input and passes it to StreamBackedCorpusView submits a path such as /etc/passwd or an application secrets file. Because StreamBackedCorpusView calls builtins.open() directly, pathsec.ENFORCE is silently bypassed and the file contents are returned. No public exploit code has been identified at time of analysis, though the attack logic is mechanically straightforward given the explicit description of the bypass. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 22, 2026
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() directly, fully bypassing the pathsec.ENFORCE security boundary regardless of how that control is configured. Web applications and services built on NLTK that pass externally controlled values to the fileid argument are at risk of having sensitive system files, credentials, and configuration data read by remote attackers. A vendor-released patch is available in NLTK 3.10.0; no public exploit has been identified at time of analysis.
RemediationAI
Upgrade NLTK to version 3.10.0 or later, which corrects StreamBackedCorpusView to route file access through pathsec.open() instead of builtins.open(). The vendor advisory is at https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8, and additional context is available from VulnCheck at https://www.vulncheck.com/advisories/nltk-streambackedcorpusview-bypasses-pathsec-enforce-arbitrary-file-read. If immediate upgrade is not feasible, audit all application code to identify every location where user-controlled or externally influenced values are passed to StreamBackedCorpusView's fileid argument and enforce strict path allowlisting at the application layer before values reach NLTK. Removing external influence over fileid entirely eliminates the attack surface without a library upgrade, but this mitigation requires thorough code review to be reliable, and the side effect is that legitimate dynamic corpus loading from user-supplied paths would need to be redesigned through a validated intermediary.
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 widely-used Python library for natural language processing. Its pathsec module provides a security control via the ENFORCE setting intended to restrict file access to approved paths within an application. However, the StreamBackedCorpusView class - used to lazily load corpus data from files - bypasses this control entirely by invoking Python's built-in builtins.open() directly rather than routing through pathsec.open(). CWE-22 (Path Traversal) characterizes the root cause: the absence of input validation or path canonicalization on the fileid argument allows access to arbitrary filesystem locations outside any intended directory scope. Because the bypass occurs at the library level, pathsec.ENFORCE configuration provides no protection against this code path regardless of its setting.
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
Network vector for web-facing NLTK deployments; no privileges or user interaction required once fileid is attacker-influenced; impact is confidentiality-only from the arbitrary file read.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can read arbitrary local files regardless of the ENFORCE setting, including sensitive system files and application credentials.
Blast Radius
ecosystem impact- 6 pypi packages depend on nltk (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Executive ViewAI
NLTK versions prior to 3.10.0 contain a critical vulnerability in StreamBackedCorpusView that enables remote attackers to bypass security controls and read arbitrary files, including credentials and configuration data. Organizations running web applications or services built on NLTK are exposed to unauthorized access to sensitive system data and potential credential theft. Immediate patching is required to eliminate this data exfiltration risk.
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
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
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
nltk is vulnerable to Inefficient Regular Expression Complexity. Rated high severity (CVSS 7.5), this vulnerability is r
EUVD-2026-64333
GHSA-8w48-h75v-cxpv
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB