Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted path or pickle payload to NLTK-backed endpoint
-
DeliveryReach pathsec.py validation layer
-
ExploitENFORCE=False suppresses blocking exception, emits only warning
-
ExecutionPath traversal reads sensitive server files or pickle payload deserializes
-
ImpactAttacker achieves file disclosure or arbitrary code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V13 - Configuration Secure default settings
|
| Exploitation Conditions | Exploitation requires that the target NLTK application processes attacker-controlled file paths or serialized pickle data through pathsec.py validation functions, and that the application has not explicitly overridden the default ENFORCE=False by setting it to True. The host must be running NLTK prior to version 3.10.0. Limiting factors: applications that use NLTK solely for in-memory text processing tasks (tokenization, POS tagging, parsing) without loading external corpora or pickle files from untrusted sources are not exposed, as the vulnerable code path is only triggered when path or pickle validation functions are called on attacker-supplied input. The CVSS PR:N indicates no authentication is required at the NLTK library level; however, upstream application-layer authentication or network perimeter controls may restrict who can deliver malicious input to the affected functions. |
| Impact | The CVSS 4.0 base score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N reflects that network-accessible NLTK applications require no authentication and no special attack preconditions. However, the provided vector assigns only VC:H while scoring VI and VA as N - this appears to underweight the potential impact of unrestricted pickle deserialization, a primitive that enables arbitrary code execution and should typically yield I:H and A:H equivalents in most CVSS 3.1 assessments; defenders should independently verify this scoping decision, as it may reflect a narrow interpretation of the advisory scope. No EPSS score was provided and no POC or CISA KEV listing is present, leaving actual exploitation probability unconfirmed. The realistic danger scales with the volume of attacker-controlled data flowing through NLTK's path and deserialization functions - organizations running NLP pipelines that ingest external corpora or user-submitted documents should treat this as urgent, since the bypass requires zero additional attacker effort beyond reaching the library's validation layer. The insecure-by-default pattern is particularly dangerous because security teams reviewing NLTK documentation or source code might reasonably assume protections are active. |
| Exploit ScenarioDerived | An attacker submits a crafted path traversal string (such as ../../etc/shadow) or a malicious pickle payload to a web service or data pipeline built on NLTK before 3.10.0. Because ENFORCE=False, pathsec.py logs a warning and continues processing, allowing the traversal to read sensitive files from the server filesystem or the pickle payload to deserialize and execute arbitrary attacker-controlled code in the server process. No public proof-of-concept has been identified at time of analysis, but the insecure default removes the primary defensive barrier with no additional attacker prerequisites beyond reaching the NLTK validation layer. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 22, 2026
Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathsec.py sets ENFORCE=False, causing all security validation to emit warnings rather than raise blocking exceptions. Any application using NLTK to process untrusted file paths or serialized data is exposed unless operators have explicitly overridden this default. No public exploit has been identified at time of analysis, but the attack surface is significant wherever NLTK handles attacker-controlled inputs, particularly given that Python pickle deserialization can enable arbitrary code execution.
RemediationAI
Upgrade to NLTK 3.10.0 or later, which is the vendor-confirmed patched release per GitHub Security Advisory GHSA-p3m8-78j2-g5p3 (https://github.com/nltk/nltk/security/advisories/GHSA-p3m8-78j2-g5p3). As an interim compensating control for environments that cannot immediately upgrade, explicitly set ENFORCE=True in pathsec.py or programmatically before any NLTK path or pickle operations - this re-enables exception-raising behavior and restores the intended security posture, though it requires a code change in each affected application and should be tested for workflow compatibility. Additionally, avoid passing untrusted file paths or externally sourced pickle files to NLTK until the upgrade is applied; if pickle data from untrusted sources is unavoidable, consider replacing NLTK's pickle loading with safer serialization formats such as JSON, noting that this may break compatibility with pre-serialized NLTK corpora and models.
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 widely-used Python library for natural language processing tasks including tokenization, parsing, classification, and corpus loading. The vulnerability resides in pathsec.py, the module responsible for enforcing security controls around two high-risk operations: path traversal prevention and pickle deserialization safety. Python's pickle module is inherently unsafe for untrusted data - deserialization of a crafted pickle object can execute arbitrary code at the interpreter level. CWE-1188 (Initialization of a Resource with an Insecure Default) precisely describes the root cause: the ENFORCE flag defaults to False, meaning validation functions run but only emit warnings on violations rather than raising exceptions that halt processing. CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covers all NLTK releases prior to 3.10.0.
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
Pickle deserialization enables arbitrary code execution beyond the NLTK process scope (S:C) with full C/I/A impact; PR:N because no authentication is required to bypass the disabled enforcement layer.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.10.0 default to ENFORCE=False in pathsec.py, causing all security validation functions to emit warnings instead of raising exceptions. Attackers can bypass path traversal and pickle deserialization protections by exploiting the disabled security controls that are only active when manually enabled.
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 versions before 3.10.0 ship with disabled security controls for path traversal and pickle deserialization, exposing applications to arbitrary code execution when processing untrusted data. No public exploit has been identified at this time, but any organization using NLTK for text processing, data pipelines, or external content analysis faces significant risk to system integrity and data confidentiality unless systems are updated to version 3.10.0.
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
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
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
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-64336
GHSA-8vh5-mgjj-w6hg
NVD
CVE.org
EPSS
Exploit-DB