Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify NLTK JSON deserialization endpoint
-
DeliveryCraft JSON payload exceeding 1000 nesting levels
-
ExploitSubmit payload via HTTP or API call
-
ExecutionJSONTaggedDecoder.decode_obj() recurses without bound
-
PersistPython RecursionError crashes worker process
-
ImpactService availability denied
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires that the target application passes externally-supplied or attacker-controlled JSON data to nltk.jsontags.JSONTaggedDecoder - either directly or through a higher-level NLTK API such as those in nltk/data.py. The vulnerability is not triggered by normal NLTK usage that does not involve JSON deserialization of untrusted input. No authentication is required per the CVSS vector (PR:N), and no special configuration beyond NLTK being installed and reachable is needed; Python's default recursion limit of 1000 (sys.getrecursionlimit()) is the triggering threshold - payloads must exceed this depth. Exploitation is limited to denial of service (process crash); there is no evidence of code execution or data exfiltration potential from this specific flaw. Applications that sanitize or depth-limit JSON input before it reaches the decoder are not exploitable. |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H) accurately reflects the accessibility of this flaw - no authentication, no complexity, network-reachable - but the real-world exploitability is conditional on the application directly passing attacker-controlled JSON to JSONTaggedDecoder. The CVSS vector provides no scope change, confirming impact is bounded to the vulnerable process itself. A public proof-of-concept (53 lines including the payload generator) is confirmed in the GHSA advisory, reducing the skill bar to near zero. No EPSS data was provided; given POC availability and a trivially constructable payload, exploitation probability for exposed deployments should be treated as high. No CISA KEV listing exists, indicating no public evidence of widespread active exploitation at this time. The gap between the high theoretical CVSS and the conditional real-world risk is meaningful: applications that do not expose JSONTaggedDecoder to untrusted input are not practically vulnerable despite the score. |
| Exploit ScenarioDerived | An attacker targeting a web service that uses NLTK to deserialize user-supplied JSON (such as a data annotation tool or NLP API) crafts a payload consisting of 1050 levels of nested JSON objects - trivially generated with a one-liner as shown in the published POC. Submitting this payload to the endpoint causes JSONTaggedDecoder.decode_obj() to recurse past Python's default limit of 1000 frames, raising an unhandled RecursionError that terminates the entire Python worker process, resulting in service downtime. Because the POC is publicly available and the payload requires no special knowledge, any attacker with network access to the endpoint can reliably reproduce the crash. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 22, 2026
Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers to crash the Python process by submitting a deeply nested JSON payload exceeding Python's default recursion limit of 1000. All NLTK releases before 3.9.4 are affected; exploitation depends on whether the calling application exposes JSONTaggedDecoder to externally-supplied JSON input. A public proof-of-concept is included in the GHSA advisory; no confirmed active exploitation (CISA KEV) has been identified at time of analysis.
RemediationAI
The primary fix is to upgrade NLTK to version 3.9.4 or later, which is implied as the patched release by the affected-version range 'nltk 0 <3.9.4' and the vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-rf74-v2fm-23pw; however, the package metadata field 'fixed in' is listed as None, meaning a tagged PyPI release at 3.9.4 is not independently confirmed at time of writing - verify availability via pip install --upgrade nltk and check PyPI before deploying. As a compensating control, applications should avoid passing externally-supplied or user-controlled JSON directly to JSONTaggedDecoder; input validation that enforces a maximum JSON nesting depth before decoding can mitigate the crash without requiring an upgrade. The GHSA advisory also provides a suggested code-level fix (adding a _depth parameter with a hard limit of 100) for teams that fork or vendor the library. Disabling or restricting access to any API endpoint that invokes nltk/data.py deserialization on untrusted input is the most impactful short-term workaround where patching is not immediately feasible.
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 via CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*, is a widely used Python library for natural language processing. The vulnerable code is in nltk/jsontags.py at JSONTaggedDecoder.decode_obj() (lines 47-52), which recursively processes dict and list structures without tracking or limiting recursion depth. CWE-674 (Uncontrolled Recursion) is the root cause: when a crafted JSON payload exceeds Python's sys.getrecursionlimit() (default 1000), an unhandled RecursionError propagates up and terminates the Python interpreter process entirely. The GHSA advisory notes that nltk/data.py is one call site that may pass externally-supplied JSON through this decoder, making deserialization pipelines the primary attack surface.
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:N/VI:N/VA:H/SC:N/SI:N/SA:N
Network-reachable, no auth or complexity required; impact is solely process crash (A:H), with no confidentiality or integrity effect and no scope change.
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK versions before 3.9.4 contain an unbounded recursion vulnerability in JSONTaggedDecoder.decode_obj() that allows attackers to cause denial of service by supplying deeply nested JSON structures. Attackers can craft JSON payloads exceeding the recursion limit to trigger an unhandled RecursionError that crashes the Python process.
Blast Radius
ecosystem impact- 188 pypi packages depend on nltk (44 direct, 144 indirect)
Ecosystem-wide dependent count for version 3.9.4.
Latest POC
1 public PoC link from github
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
NLTK versions before 3.9.4 contain a denial-of-service vulnerability that allows unauthenticated attackers to crash Python processes through malformed JSON input, creating availability risk for applications performing natural language processing on external data. Organizations using affected NLTK versions must patch immediately to prevent service interruptions and data processing pipeline failures.
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
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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
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-64310
GHSA-cv2g-m8rr-888c
NVD
CVE.org
EPSS
VulDB
Exploit-DB