Skip to main content

NLTK CVE-2026-126302

| EUVDEUVD-2026-125219 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
4.8
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain local write access to trusted NLTK data root
  2. Delivery
    Plant in-root symlink pointing at external SQLite file
  3. Exploit
    Application calls chat80.sql_query() on the resource
  4. Execution
    sqlite3.connect() follows symlink, bypassing pathsec guard
  5. Impact
    Read 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

nltk 3.9.4 <3.10.4

Affected Packages

pypi nltk fix: 3.10.4

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

Vendor (VulnCheck) PRIMARY 4.8 MEDIUM
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
vuln.today AI 3.3 LOW

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).

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 3.3 LOW

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 13, 2026 - 10:02 EUVD
CVE Published
Nov 13, 2026 - 09:36 cve.org
MEDIUM 4.8

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 193 pypi packages depend on nltk (46 direct, 147 indirect)

Ecosystem-wide dependent count for version 3.9.4.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
High
NLTK is one of the most popular Python NLP libraries, widely installed via PyPI
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

More in Nltk

View all
CVE-2026-79657 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p

CVE-2026-78683 CRITICAL POC
9.4 Aug 25

Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic

CVE-2025-14009 HIGH POC
8.8 Feb 18

Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow

CVE-2026-63312 HIGH POC
8.7 Aug 22

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc

CVE-2026-62384 HIGH POC
8.7 Aug 22

Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to

CVE-2026-126297 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's ConllCorpusReader.srl_instances() lets an attacker who supplies a crafted CoNLL SRL corpus pin

CVE-2026-126298 HIGH POC
8.7 Nov 13

CPU exhaustion in NLTK's Tree.chomsky_normal_form() right-factor binarization affects NLTK through 3.10.3 and lets remot

CVE-2026-126299 HIGH POC
8.7 Nov 13

Quadratic CPU exhaustion in NLTK's CCG lexicon parser (nltk.ccg.lexicon.fromstring, also re-exported as nltk.ccg.chart.f

CVE-2026-126303 HIGH POC
8.7 Nov 13

Denial of service in NLTK before 3.10.4 allows remote attackers to pin a CPU core and exhaust bounded worker pools by ca

CVE-2026-66393 HIGH POC
8.7 Aug 22

Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers

CVE-2026-62388 HIGH POC
8.7 Aug 22

Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse

CVE-2026-78681 HIGH POC
8.7 Aug 25

XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy