Skip to main content

NLTK EUVDEUVD-2026-125225

| CVE-2026-126296 MEDIUM
External Control of File Name or Path (CWE-73)
6.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Control tab_dir argument exposed by application
  2. Exploit
    Supply path outside permitted data root
  3. Execution
    Vulnerable function calls built-in open() bypassing pathsec
  4. Impact
    Read or overwrite files beyond sandbox boundary

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
Exploitation Conditions

Exploitation requires an application that (1) calls nltk.classify.maxent.load_maxent_params() or save_maxent_params() with a tab_dir value derived from attacker-influenced input, and (2) relies on nltk.pathsec (ENFORCE=True) as its filesystem security boundary - the advisory explicitly states the flaw is that these functions call Python's built-in open() directly instead of the pathsec-aware opener, so pathsec.ENFORCE=True does not contain them. Limiting factors: impact is bounded by the NLTK process's own filesystem permissions; deployments that do not use pathsec as a boundary, or never pass untrusted data into tab_dir, are not meaningfully exposed; the save-side defect is only present up to and including 3.10.3, while the load side was already hardened in 3.9.4/3.10.3.

Impact

This is a moderate-severity issue, not a top-priority emergency. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:N/PR:N/UI:N) scores 6.3 (Medium), and the key limiter is AC:H - exploitation is not against a default, standalone attack surface but depends on an application wiring attacker-influenced input into the tab_dir argument while relying on nltk.pathsec as a filesystem boundary. The vuln.today decision label is 'this_month' (not act_now/emergency), it is NOT on CISA KEV, and no EPSS score was provided - together these signal a real but non-urgent fix-in-maintenance-window item rather than mass exploitation. A public PoC reference exists in the GHSA advisory; it is not verified as working weaponized exploit code, and PoC availability must not be conflated with active exploitation. One notable conflict: the GHSA summary and description state arbitrary file READ as well as write, yet the supplied CVSS 4.0 vector sets VC:N (no confidentiality impact), which appears to understate the information-disclosure dimension - treat the confidentiality rating as likely too low. Also note CWE differs by source (NVD-style CWE-73 external control of filename vs GHSA CWE-22 path traversal). Overall: a legitimate sandbox-bypass defect worth patching promptly, but real-world risk is gated by whether a deployment actually depends on pathsec enforcement and exposes tab_dir to untrusted control.

Exploit ScenarioDerived

An application that uses NLTK and treats nltk.pathsec (ENFORCE=True) as its filesystem containment boundary exposes load_maxent_params()/save_maxent_params() with a tab_dir value influenced by untrusted input. The attacker supplies a tab_dir pointing outside the permitted data root, causing load_maxent_params() to read arbitrary files (e.g. weights.txt/mapping.tab paths resolved outside the sandbox) or save_maxent_params() to create/overwrite arbitrary files, all bounded by the NLTK process's filesystem permissions. The GHSA advisory includes a PoC demonstrating that pathsec.open() rejects the outside-root path while the vulnerable functions reach it via direct built-in open().

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

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

Alert me

AnalysisAIv1 – Nov 13, 2026

Path traversal in NLTK's maxent model-parameter helpers lets caller-controlled input escape the nltk.pathsec filesystem sandbox: save_maxent_params() and load_maxent_params() build paths from the tab_dir argument and open them with Python's built-in open() rather than the pathsec-aware opener, so pathsec.ENFORCE=True does not contain the access. All releases up to and including 3.10.3 carry the save-side defect, while the load side was already hardened in 3.9.4 and 3.10.3; the vendor fix ships in 3.10.4. Real exposure is narrow - an application must pass attacker-influenced data into tab_dir and rely on pathsec as its security boundary - and impact is capped by the NLTK process's own filesystem permissions, which is consistent with the moderate assessed score; a reproduction outline accompanies the advisory, but it is not verified as working exploit code, and there is no KEV entry or public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade to NLTK 3.10.4 (for example pip install --upgrade 'nltk>=3.10.4'), which contains the save-side commit 2a92b7182 on top of the load-side fix already present since 3.9.4; note that at the time the advisory note was written no release tag contained 2a92b7182, so confirm the installed version against the 3.10.4 tag before relying on it, and track https://github.com/nltk/nltk/security/advisories/GHSA-59f9-gqg8-mqpj for the authoritative fix and release status. Updating is the complete fix because the defect is that these two functions bypass the pathsec opener entirely. If upgrading is not immediately possible, treat tab_dir as untrusted input: derive it only from a fixed allow-list of directory names rather than from request data, and normalize and confine it (os.path.realpath plus a check that the result still sits beneath an approved root) before calling either function - this adds an application-side validation step that must be maintained and leaves a small window between check and open. Applications that never enable pathsec or that run these helpers with trusted, code-controlled tab_dir values are not meaningfully exposed, but running the NLTK process under a least-privilege account limits the blast radius of any traversal at the cost of restricting which data roots the model can legitimately load from.

Affected VersionsENISA

nltk 0 <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 ships a module called nltk.pathsec that is documented as the mechanism for confining filesystem access to permitted data roots, with strict enforcement intended to block unauthorized reads and writes when pathsec.ENFORCE is set. The affected code lives in nltk/classify/maxent.py: load_maxent_params() derives <tab_dir>/weights.txt, <tab_dir>/mapping.tab, <tab_dir>/labels.txt and <tab_dir>/alwayson.tab, and save_maxent_params() creates or overwrites the parameter files under the same tab_dir. Neither function routes those paths through pathsec, so the sandbox is simply skipped. The GitHub advisory classifies this as CWE-22 (path traversal) while the CVE record uses CWE-73 (external control of file name or path); both describe the same root cause - a security-relevant path assembled from an externally supplied directory name and handed straight to the native file API. The load-side hardening (commit f2556f9e1) makes load_maxent_params read through open_datafile on a PathPointer whose open is pathsec.open, and is contained in tag 3.9.4 and every later tag. The save-side hardening (commit 2a92b7182, PR #3759 'Harden maxent / named-entity model-artifact saves against shared-tmp planting', merged 2026-08-18, merge commit a167e94bc) validates tab_dir and writes every parameter file through pathsec.open; at the time of the advisory note no release tag contained it. A security probe added alongside PR #3753 also lets load_maxent_params accept a plain str or Path via FileSystemPathPointer, and the same probe run against develop reports that a str or Path tab_dir raises AttributeError before any file is opened - a crash rather than a containment bypass, since nothing is read or written.

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 6.3 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.8 MEDIUM

AC:H because exploitation needs attacker-controlled tab_dir plus reliance on pathsec enforcement; PR:N as the functions need no auth; C:L/I:L for bounded arbitrary read/write.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
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 6.3

DescriptionCVE.org

NLTK before 3.10.4 contains a path traversal vulnerability in save_maxent_params() and load_maxent_params() that bypasses the pathsec filesystem restriction mechanism. Attackers who control the tab_dir argument can read or overwrite model parameter files outside permitted data roots, because the functions call Python's built-in open() directly.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 6,309 pypi packages depend on nltk (3,111 direct, 3,281 indirect)

Ecosystem-wide dependent count for version 3.10.4.

Threat Intelligence Overview

EPSS Score
0.3%
Top 73% exploitable
Prevalence
High
NLTK is a very widely deployed Python natural-language-processing library
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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.3%
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
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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