Skip to main content

NLTK CVE-2026-128137

| EUVDEUVD-2026-130493 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-11-19 GitHub_M GHSA-g58v-j9g9-5gfg
5.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Gain local account or supply untrusted corpus
  2. Exploit
    Plant intermediate-directory symlink inside corpus root
  3. Execution
    Invoke view method words()/sents()/abspaths() on crafted fileid
  4. Impact
    Read and disclose out-of-root file contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Requires a LOCAL principal who can create an intermediate-directory symlink inside an NLTK corpus root (e.g. any account that loads NLTK corpora, or an attacker supplying an untrusted corpus in a supply-chain/web-service loading model) and who then invokes a corpus-reader view method (PlaintextCorpusReader.words/sents/paras, SyntaxCorpusReader.parsed_sents/tagged_sents/sents/tagged_words/words) or abspaths()/abspath() with a crafted relative fileid; the hardened open() entry point is NOT affected. Limiting factors: there is no remote vector (AV:L) and the attacker needs local write access within the corpus root plus some privilege (PR:L); on releases with pathsec enforcement (3.10.x) the disclosed file must still lie inside a global NLTK allowed root, bounding what can be read, whereas 3.9.4 ships pathsec.ENFORCE=False and permits a broader escape beyond the allowed roots. No victim user interaction is required.

Impact

The available signals are largely consistent and point to a genuine but bounded, lower-urgency issue rather than a top-tier emergency. The provided CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, base 5.5) describes a local, low-privilege, confidentiality-only information disclosure, matching the vuln.today decision label of 'this_month' (not act_now/emergency). The CWE-59 improper link-resolution root cause and the local attack vector mean exploitation requires an attacker who already has a local account (or can supply an untrusted corpus) and can create a symlink inside a corpus root, which sharply narrows real-world risk despite the C:H confidentiality rating. No CISA KEV listing is present in the input, so this is NOT confirmed actively exploited, and no EPSS score was supplied, so widespread-exploitation probability cannot be quantified from the data. A detailed, self-checking PoC is embedded in the GHSA advisory and was dynamically reproduced against 3.9.4, 3.10.3 and master, so a public PoC reference exists even though the input does not label it as confirmed distributable working exploit code. Net: real and worth patching within the month, but a local confidentiality bug with meaningful preconditions, not a remotely wormable critical.

Exploit ScenarioDerived

On a multi-user host, or a service that loads untrusted/attacker-supplied corpora, an attacker places an intermediate-directory symlink inside an NLTK corpus root pointing at a sibling location, then calls a view method such as PlaintextCorpusReader.words(['sub/secret.txt']) or abspaths(); because these methods skip the scoped-root guard that open() enforces, the symlink is followed and the out-of-root file's contents are returned. A detailed PoC reference exists in the advisory and was reproduced on 3.9.4/3.10.3/master; being local (AV:L) and low-complexity (AC:L), it is reliable once the attacker can write a symlink into the corpus directory.

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 19, 2026

Local information disclosure in NLTK 3.9.4 through 3.10.3: the corpus-reader view methods (PlaintextCorpusReader.words/sents/paras and SyntaxCorpusReader.parsed_sents/tagged_sents/sents/tagged_words/words) and abspath()/abspaths() open file pointers through pathsec.open() with required_root unset, so only the lexical join and the global NLTK allowed-roots check apply, while the hardened CorpusReader.open() path additionally enforces the scoped corpus root. A local, low-privileged attacker (CVSS PR:L) who can create an intermediate-directory symlink inside a corpus root and then invoke a view method or abspaths() with a crafted relative fileid can read the contents of a file that lies outside the corpus root - on 3.10.x the target must still sit inside a global NLTK allowed root, but 3.9.4 ships pathsec.ENFORCE=False and permits a broader escape. The advisory ships a self-checking reproduction script that was dynamically confirmed on 3.9.4, 3.10.3 and master; it is not listed as confirmed active exploitation (no CISA KEV entry), and in the reproduction the identical fileid is refused by reader.open() but read successfully through the view-method channel.

RemediationAI

Vendor-released patch: upgrade to nltk 3.10.4, which routes abspath()/abspaths() through a new _guard_fileid() helper that calls validate_path(path, context='CorpusReader', required_root=self._root) before returning the pointer, closing the view-method channel (PR https://github.com/nltk/nltk/pull/3761, commit 9f7cf06b4af4ca5c65381ed0abc17e989dc54400, release https://github.com/nltk/nltk/releases/tag/v3.10.4; advisory https://github.com/nltk/nltk/security/advisories/GHSA-g58v-j9g9-5gfg). Where upgrading is not immediately possible, the evidence shows CorpusReader.open() is not affected - it refuses the same fileid with 'Security Violation [CorpusReader]: Path ... escapes root ...' - so callers that only read plaintext or parsed corpora can open fileids through reader.open() and tokenize/parse the resulting stream themselves instead of calling words()/sents()/paras()/parsed_sents()/tagged_sents(), at the cost of losing the incremental StreamBackedCorpusView behaviour and reimplementing the reader's tokenisation; abspaths()/abspath() pointers should likewise be treated as untrusted. Because the attack requires planting an intermediate directory symlink inside the corpus root, ensuring corpus roots are not writable by untrusted principals and not loading corpora whose directory trees contain unexpected symlinks removes the prerequisite - with the caveat that on 3.9.4 pathsec enforcement is disabled entirely, so the allowed-roots boundary must not be relied on for containment until 3.10.4 is installed.

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

The flaw is CWE-59 (improper link resolution before file access) with a path-traversal flavour, caused by two sibling file-access channels on the same CorpusReader disagreeing about the sandbox. The guarded channel, CorpusReader.open() (nltk/corpus/reader/api.py:235-257), applies a lexical guard rejecting absolute paths and '..' and then calls nltk.pathsec.validate_path(..., required_root=self._root), whose scoped branch resolves the target with Path(raw).resolve() and raises ValueError when the result is not relative to the corpus root. The unguarded channel is abspath()/abspaths(), which only performs self._root.join(fileid); FileSystemPathPointer.join() normalises lexically (normpath plus root-prefix startswith) without realpath/Path.resolve, so an intermediate directory symlink survives verbatim, and FileSystemPathPointer.open() calls pathsec.open(raw_path, 'rb') with required_root left at its default None. That means only the global allowed-roots check runs, and although _hardened_open uses O_NOFOLLOW plus a post-open fd realpath re-validation, O_NOFOLLOW only refuses a symlink in the final path component, so an intermediate directory symlink such as corpus/sub -> <other allowed root> is followed by the kernel. The view methods (plaintext.py:67-118 and 230, api.py:473-519) feed these unguarded pointers into StreamBackedCorpusView, which simply calls pointer.open(). On 3.9.4 the same abspaths()/view-method code path exists but pathsec.ENFORCE is False and pathsec.open is a thin builtins.open wrapper with no _hardened_open/O_NOFOLLOW, so even the global allowed-roots boundary is not enforced and the escape is broader; existing regression tests cover only the open()/validate_path(required_root=...) path and not the view-method channel.

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 (GitHub_M) PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.5 MEDIUM

Local symlink placement by a low-privileged account (AV:L/PR:L), no user interaction, straightforward trigger (AC:L); confidentiality-only file disclosure so C:H, I:N, A:N.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 20:04 EUVD
CVE Published
Nov 19, 2026 - 18:02 cve.org
MEDIUM 5.5

DescriptionCVE.org

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.9.4 until 3.10.4, NLTK corpus-reader path pointers and view methods validate a requested relative path without consistently resolving intermediate directory symlinks against the reader's scoped root. A local attacker who can place such a symlink can make abspaths or words reach a readable file outside the corpus root and disclose its contents. On releases with pathsec enforcement, the file must remain inside a global NLTK allowed root; version 3.9.4 has enforcement disabled and permits a broader escape. This issue is fixed in version 3.10.4.

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 95% exploitable
Prevalence
High
NLTK is among the most widely installed Python NLP libraries
Threat Intel
1
1 source
Data Quality
4 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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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