NLTK
CVE-2026-0847
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify NLP API accepting file/corpus parameters
-
DeliveryCraft HTTP request with path traversal payload
-
ExploitNLTK CorpusReader processes unsanitized path
-
ExecutionTraverse filesystem to sensitive files
-
PersistExfiltrate SSH keys, tokens, or configs
-
ImpactLateral movement or privilege escalation
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 target application uses NLTK CorpusReader classes (WordListCorpusReader, TaggedCorpusReader, or BracketParseCorpusReader specifically) and passes user-controlled input as file path parameters to these readers without sanitization. Most critically vulnerable are NLP APIs, chatbots, machine learning pipelines, or web applications where corpus names, file paths, or data source identifiers are derived from HTTP request parameters, API payloads, or user uploads. Default NLTK installations that only load built-in corpora from hardcoded paths are NOT vulnerable. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms no special conditions for network exploitation once the vulnerable code path exists - no authentication, user interaction, or complex setup required. Exploitation is LIMITED to environments where application logic connects external input to CorpusReader instantiation, which is deployment-specific and not universal to all NLTK users. |
| Impact | CVSS 7.5 (High) reflects the unauthenticated network attack vector with zero complexity and high confidentiality impact (AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:N), indicating straightforward exploitation for information disclosure. However, the EPSS score of 0.25% (below median) suggests limited observed exploitation attempts, likely because successful attacks require specific deployment patterns where NLTK processes untrusted file path inputs - not universal to all NLTK installations. The huntr.com security bounty disclosure provides technical details that could accelerate exploit development. Real-world risk is HIGHEST for public-facing NLP APIs, chatbots, and ML platforms that accept user-supplied corpus names or file references without application-layer validation. The description's mention of potential RCE escalation path is concerning but not confirmed from available data - the CVSS vector shows only confidentiality impact (I:N), not integrity. Organizations should prioritize patching if NLTK handles any external input, but assess whether their specific deployment actually exposes CorpusReader functionality to untrusted sources. The 'Authentication Bypass' tag appears misapplied - this is pure path traversal, not auth bypass, though file disclosure could leak credentials enabling subsequent bypass. |
| Exploit ScenarioDerived | An attacker identifies a public-facing sentiment analysis API that accepts a 'corpus_name' parameter to customize language models. By submitting a crafted request with corpus_name set to '../../../etc/passwd' or '../../../home/user/.ssh/id_rsa', the attacker exploits NLTK's WordListCorpusReader to traverse directories and retrieve the file contents in the API response or error message. With SSH keys or API tokens extracted, the attacker pivots to lateral movement or account takeover. Public exploit details from the huntr.com bounty disclosure provide attackers with specific CorpusReader methods and payload examples to replicate the attack. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 28, 2026
Path traversal in NLTK (Natural Language Toolkit) versions ≤3.9.2 allows remote unauthenticated attackers to read arbitrary files from the server hosting NLP applications. Multiple CorpusReader classes (WordListCorpusReader, TaggedCorpusReader, BracketParseCorpusReader) fail to sanitize file paths, enabling directory traversal to access sensitive files including SSH keys, API tokens, and system configurations. This poses critical risk in machine learning APIs, chatbots, and NLP pipelines that process user-controlled file inputs. EPSS score of 0.25% (48th percentile) suggests low widespread exploitation probability despite public disclosure via huntr.com bounty, though the unauthenticated network vector (AV:N/PR:N) and zero attack complexity make this readily exploitable once targets are identified.
Earlier versions of this analysis (1)
A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. [CVSS 8.6 HIGH]
RemediationAI
Upgrade NLTK to version 3.9.3 or later where vendor patch is available (exact patched version should be confirmed from https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f966 or official NLTK release notes). As immediate mitigation for systems that cannot upgrade, implement application-layer input validation to reject file paths containing traversal sequences ('..' components, absolute paths, symbolic links) before passing to CorpusReader classes - use allowlist validation restricting corpus names to alphanumeric identifiers mapped server-side to absolute paths. Deploy filesystem-level controls such as chroot jails, containers with read-only mounts, or AppArmor/SELinux policies restricting NLTK process file access to designated corpus directories only. Note that input filtering alone may be bypassed via encoding variations (URL encoding, Unicode normalization) so defense-in-depth with OS-level restrictions is essential. Monitor file access logs for unusual patterns indicating traversal attempts. If NLTK functionality is exposed via web APIs, ensure the API gateway enforces strict schema validation on corpus identifiers. Review application architecture to eliminate scenarios where user input directly controls file path parameters to NLTK functions.
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 widely-used Python library for natural language processing and computational linguistics. The vulnerability affects CorpusReader classes responsible for loading and parsing linguistic corpora from the filesystem. The root cause (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) stems from inadequate validation of file path parameters passed to these reader classes. Attackers can inject path traversal sequences (e.g., '../../../etc/passwd') in filenames or corpus identifiers, bypassing intended directory restrictions. The affected component cpe:2.3:a:nltk:nltk operates in many production environments as a backend service for text analysis, sentiment analysis, tokenization, and machine learning model preprocessing, making file system access controls critical. The vulnerability exists in core data loading functions that directly interact with the operating system's file API without canonicalization or jail restrictions.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.
Executive ViewAI
NLTK versions 3.9.2 and earlier contain a path traversal vulnerability enabling unauthenticated remote attackers to read arbitrary files from servers, including SSH keys, API tokens, and system configurations. Organizations deploying NLTK in production NLP applications, machine learning APIs, or chatbots face immediate risk of credential exposure and sensitive data disclosure without authentication requirements.
Apply vendor patch. If immediate upgrade is unavailable: (1) Restrict network access to NLP applications to trusted IP ranges only; (2) Disable or remove CorpusReader functionality that accepts user-controlled file paths; (3) Run NLTK processes with least-privilege service accounts with minimal filesystem permissions; (4) Implement Web Application Firewall rules to block path traversal patterns (../, ..\ sequences) in input parameters.
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.
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)NVD
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
Same weakness CWE-22 – Path Traversal
View allSame technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
GHSA-68j8-pq59-fqgm
NVD
CVE.org
EPSS
VulDB
Exploit-DB