Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local write access to trusted NLTK data root
-
DeliveryPlant in-root symlink pointing at external SQLite file
-
ExploitApplication calls chat80.sql_query() on the resource
-
Executionsqlite3.connect() follows symlink, bypassing pathsec guard
-
ImpactRead rows from out-of-sandbox SQLite database
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires all of: (1) the application calls nltk.sem.chat80.sql_query() (directly or via sql_demo()) to resolve a SQLite resource through nltk.data.find; (2) at least one directory the attacker can write to is registered as an NLTK data root (a shared, writable, or downloaded corpus directory); and (3) the attacker replaces the expected on-disk resource (e.g. corpora/city_database/city.db) with a symbolic link whose target is an attacker-chosen SQLite file outside every data root. Limiting factors that reduce realistic risk: the attacker must already possess local write access into a trusted data root (PR:L, AV:L - no remote path); the read primitive is bounded to SQLite-format files readable by the process user (a non-SQLite target raises sqlite3.DatabaseError and leaks nothing); write/integrity impact is only a plausible side effect (SQLite -wal/-journal sidecars), not a demonstrated arbitrary write; and the vulnerable chat80 module is a niche, rarely-invoked feature, so most NLTK deployments never reach this sink. |
| Impact | This is a medium-severity, local, confidentiality-only sandbox-escape (CVSS 4.0 base 4.8; vector AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N). The signals are internally consistent and point to a genuine but non-urgent issue rather than a high-impact emergency: the attack vector is local (AV:L) and requires PR:L - specifically the ability to write into a directory the target application already trusts as an NLTK data root - so there is no remote, unauthenticated exploitation path. The vuln.today decision label is 'this_month' (not act_now/emergency), and no EPSS score and no CISA KEV listing are present in the input, so there is no evidence of mass or active exploitation. A detailed, working proof-of-concept is published in the GHSA advisory and was reproduced against the exact published 3.10.3 wheel, which raises confidence that the flaw is real and triggerable, but PoC availability is not the same as in-the-wild exploitation. The practical risk is bounded by two strong preconditions - a pre-existing local write foothold into a trusted data root, and the application actually invoking the obscure chat80.sql_query()/sql_demo() code path - and by the impact being a read primitive limited to SQLite-format files readable by the process user. Net: a real but low-priority defense-in-depth sandbox-containment bug, not a high-CVSS-but-overhyped remote issue and not a widespread-exploitation threat. Note also that the 'Authentication Bypass' tag is misleading - this is a path-containment/symlink-following escape (CWE-59), not an auth bypass. |
| Exploit ScenarioDerived | An application uses NLTK with a shared or downloaded corpus directory registered as a data root that an attacker can write into. The attacker plants a symbolic link at the expected in-root resource path (e.g. corpora/city_database/city.db) pointing at a SQLite database elsewhere on the filesystem; when the application later calls chat80.sql_query() (or sql_demo()) for that resource, sqlite3.connect() follows the link past the pathsec guard and returns rows from the out-of-sandbox database. A full working PoC exists in the GHSA advisory and was reproduced against the published 3.10.3 wheel; the attack is local (AV:L), low-complexity (AC:L) and needs only the low-privilege write access (PR:L) into a trusted data root. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Local information disclosure in NLTK 3.9.4 through 3.10.3: an attacker who can write into a directory the application registers as an NLTK data root can plant a symbolic link at an expected corpus resource (for example corpora/city_database/city.db) so that nltk.sem.chat80.sql_query() follows the link and returns rows from a SQLite database located outside the pathsec sandbox. The flaw is a symlink-following bypass (CWE-59): sql_query() hands the raw nltk.data.find() pointer string straight to sqlite3.connect() instead of opening the resource through the sandboxed FileSystemPathPointer.open() route, so the containment check never runs. Exposure is bounded - the read primitive only reaches SQLite-format files readable by the process user, the attacker must already hold local write access inside a trusted data root, and chat80 is a rarely-invoked module - so the realistic impact is low-confidentiality local disclosure rather than remote compromise. CVE-2026-126302 is not listed in CISA KEV and no active exploitation is reported, though a public proof-of-concept script that was reproduced against the 3.10.3 wheel accompanies the upstream advisory; prioritization is this_month rather than emergency.
RemediationAI
Vendor-released patch: 3.10.4 (pip/nltk fixed in 3.10.4), which closes the range >= 3.9.4, <= 3.10.3; upgrade nltk to 3.10.4 or later. Administrators who cannot upgrade immediately should apply the vendor-stated interim mitigations: ensure that no attacker-writable directory is registered on nltk.data.path (shared, world-writable, or untrusted downloaded corpus directories in particular, since that write capability is the sole prerequisite for exploitation), and avoid calling nltk.sem.chat80.sql_query() or sql_demo() on resources that live in shared or untrusted locations - note this disables the chat80 SQL demo functionality. If maintaining a local patch is feasible, the upstream fix is on open pull request #3888, whose commits 9f5d2ea6d (sql_query calls validate_path before nltk.data.find, as cities2table, val_dump and val_load already do) and 47bd0476e (resolve the file behind the resource name through the data roots and pin its store) backport the containment guard; the trade-off is running unreleased code, and any other read sink that passes an nltk.data.find() path directly to sqlite3.connect() should be audited for the same omission. Details are in the vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-xmfg-f9cm-w86q and the VulnCheck advisory at https://www.vulncheck.com/advisories/nltk-3.9.4-before-3.10.4-symlink-sandbox-escape-via-chat80-sql-query.
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's data sandbox, nltk.pathsec (shipped with ENFORCE = True from 3.9.4 onward), is meant to guarantee that any file access performed through NLTK data resolution stays inside the registered data roots: validate_path and pathsec.open resolve the real path via Path(...).resolve() and reject targets outside the allowed roots, and FileSystemPathPointer.open() delegates to that guard. sql_query() in nltk/sem/chat80.py instead calls nltk.data.find(dbname), whose checks (_UNSAFE_NO_PROTOCOL_RE plus encoded and normalized-form name guards) operate only on the resource-name string, and receives a FileSystemPathPointer whose __init__ performs os.path.abspath plus an existence check - abspath normalizes but does not collapse symlinks (no realpath). That unresolved string is passed to sqlite3.connect(), so the kernel follows an in-root symlink to an out-of-root SQLite file and the query executes against it. The sibling helpers in the same module (cities2table, val_dump, val_load) call validate_path in later development, and the upstream fix (pull request #3888, commits 9f5d2ea6d and 47bd0476e) adds the same validation to sql_query and pins the resolved store; no published release up to 3.10.3 carries that guard. This is CWE-59 link following with a CWE-22 path-containment overlap; note that 3.9.3 and earlier do not ship nltk/pathsec.py and therefore do not expose this particular sandbox-escape surface, which is why the CPE range cpe:2.3:a:nltk:nltk:* maps here to 3.9.4 through 3.10.3. The mechanism is fully described in the upstream GHSA-xmfg-f9cm-w86q write-up, including the specific call chain find() → FileSystemPathPointer → sqlite3.connect() that skips the guard.
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:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Requires local low-privilege write access into a trusted data root (AV:L, PR:L), trigger is a planted symlink with no special conditions (AC:L); impact is a bounded SQLite read only (C:L, I:N, A:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
NLTK from 3.9.4 before 3.10.4 contains a symlink following vulnerability in nltk.sem.chat80.sql_query() that bypasses the pathsec data-root sandbox containment check. Attackers who can write into a trusted NLTK data root can plant a symbolic link to read SQLite databases outside the sandbox.
Blast Radius
ecosystem impact- 193 pypi packages depend on nltk (46 direct, 147 indirect)
Ecosystem-wide dependent count for version 3.9.4.
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
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
CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin
CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot
Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f
Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca
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
EUVD-2026-125219
GHSA-w2j9-qh3j-4h63
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB