Skip to main content

NLTK CVE-2026-63312

| EUVDEUVD-2026-64333 HIGH
Path Traversal (CWE-22)
2026-08-22 VulnCheck GHSA-8w48-h75v-cxpv GHSA-x5ph-mj9p-rfr8 PYSEC-2026-3730
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify web endpoint accepting user-supplied fileid for NLTK corpus loading
  2. Delivery
    Submit crafted file path (e.g., /etc/passwd or app secrets file) as fileid
  3. Exploit
    StreamBackedCorpusView invokes builtins.open() directly
  4. Execution
    pathsec.ENFORCE boundary bypassed silently
  5. Persist
    Arbitrary local file contents returned in application response
  6. Impact
    Exfiltrate credentials or sensitive configuration data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the consuming application passes attacker-controlled or externally influenced values to the fileid argument of StreamBackedCorpusView without application-layer path validation or allowlisting. The bypass is unconditional at the library level for all NLTK versions before 3.10.0 - pathsec.ENFORCE configuration does not matter. Exploitation is therefore limited to deployments where user input reaches this parameter, such as web APIs, corpus browsers, or NLP pipelines that accept dynamic file identifiers from external sources. Authentication requirements are determined entirely by how the consuming application gates access to the vulnerable endpoint, not by NLTK itself; the CVSS 4.0 vector's PR:N reflects no privilege requirement at the library layer. Offline or batch NLTK usage with no external fileid exposure is not exploitable.

Impact

The CVSS 4.0 base score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N/VC:H reflects the high confidentiality impact assuming a network-accessible NLTK deployment where user input reaches the fileid argument - the official scoring treats no specific attack requirement as necessary. In practice, real-world exploitability is conditional on that specific application usage pattern: an NLP inference API, corpus browsing service, or text-processing pipeline that forwards user-supplied identifiers to StreamBackedCorpusView is directly at risk, while offline batch processing that never exposes fileid to external input is not. No active exploitation has been confirmed by CISA KEV, and no public POC code has been identified at time of analysis, reducing urgency compared to similarly scored vulnerabilities with confirmed in-the-wild exploitation. EPSS data was absent from the source intelligence; prioritization should weight deployment pattern specificity and whether applications in scope pass external input to fileid rather than relying on the raw score alone.

Exploit ScenarioDerived

An attacker targeting a web service that accepts a corpus file identifier from user input and passes it to StreamBackedCorpusView submits a path such as /etc/passwd or an application secrets file. Because StreamBackedCorpusView calls builtins.open() directly, pathsec.ENFORCE is silently bypassed and the file contents are returned. No public exploit code has been identified at time of analysis, though the attack logic is mechanically straightforward given the explicit description of the bypass.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.7% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 22, 2026

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() directly, fully bypassing the pathsec.ENFORCE security boundary regardless of how that control is configured. Web applications and services built on NLTK that pass externally controlled values to the fileid argument are at risk of having sensitive system files, credentials, and configuration data read by remote attackers. A vendor-released patch is available in NLTK 3.10.0; no public exploit has been identified at time of analysis.

RemediationAI

Upgrade NLTK to version 3.10.0 or later, which corrects StreamBackedCorpusView to route file access through pathsec.open() instead of builtins.open(). The vendor advisory is at https://github.com/nltk/nltk/security/advisories/GHSA-x5ph-mj9p-rfr8, and additional context is available from VulnCheck at https://www.vulncheck.com/advisories/nltk-streambackedcorpusview-bypasses-pathsec-enforce-arbitrary-file-read. If immediate upgrade is not feasible, audit all application code to identify every location where user-controlled or externally influenced values are passed to StreamBackedCorpusView's fileid argument and enforce strict path allowlisting at the application layer before values reach NLTK. Removing external influence over fileid entirely eliminates the attack surface without a library upgrade, but this mitigation requires thorough code review to be reliable, and the side effect is that legitimate dynamic corpus loading from user-supplied paths would need to be redesigned through a validated intermediary.

Affected VersionsENISA

nltk 0 <3.10.0

Affected Packages

pypi nltk fix: 3.10.0

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 by CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*, is a widely-used Python library for natural language processing. Its pathsec module provides a security control via the ENFORCE setting intended to restrict file access to approved paths within an application. However, the StreamBackedCorpusView class - used to lazily load corpus data from files - bypasses this control entirely by invoking Python's built-in builtins.open() directly rather than routing through pathsec.open(). CWE-22 (Path Traversal) characterizes the root cause: the absence of input validation or path canonicalization on the fileid argument allows access to arbitrary filesystem locations outside any intended directory scope. Because the bypass occurs at the library level, pathsec.ENFORCE configuration provides no protection against this code path regardless of its setting.

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

Network vector for web-facing NLTK deployments; no privileges or user interaction required once fileid is attacker-influenced; impact is confidentiality-only from the arbitrary file read.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
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
Aug 22, 2026 - 15:01 EUVD
CVE Published
Aug 22, 2026 - 14:12 cve.org
HIGH 8.7

DescriptionCVE.org

NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can read arbitrary local files regardless of the ENFORCE setting, including sensitive system files and application credentials.

Blast Radius

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

Ecosystem-wide dependent count for version 3.10.0.

Executive ViewAI

Why It Matters

NLTK versions prior to 3.10.0 contain a critical vulnerability in StreamBackedCorpusView that enables remote attackers to bypass security controls and read arbitrary files, including credentials and configuration data. Organizations running web applications or services built on NLTK are exposed to unauthorized access to sensitive system data and potential credential theft. Immediate patching is required to eliminate this data exfiltration risk.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 52% exploitable
Prevalence
Medium
popular Python NLP library, but NLP web services are not universally deployed
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

65
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: +20
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-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-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

CVE-2026-78682 HIGH POC
8.7 Aug 25

Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service

CVE-2026-70626 HIGH POC
8.6 Aug 22

Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu

CVE-2026-62385 HIGH POC
8.2 Aug 22

Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated

CVE-2021-43854 HIGH POC
7.5 Dec 23

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a

CVE-2021-3828 HIGH POC
7.5 Sep 27

nltk is vulnerable to Inefficient Regular Expression Complexity. Rated high severity (CVSS 7.5), this vulnerability is r

Vendor StatusVendor

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