Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 55%

CVE-2026-12243: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in nltk nltk/nltk

0
High
VulnerabilityCVE-2026-12243cvecve-2026-12243cwe-22
Published: 06/30/2026 (06/30/2026, 00:14:35 UTC)
Source: CVE Database V5
Vendor/Project: nltk
Product: nltk/nltk

Description

NLTK version 3.9.4 is vulnerable to a path traversal attack due to an incomplete fix for GitHub Issue #3504. The `_UNSAFE_NO_PROTOCOL_RE` regex in `nltk/data.py` checks for literal `../` sequences but fails to account for percent-encoded traversal sequences such as `..%2f`. The `url2pathname()` function decodes these sequences after the validation step, allowing an attacker to bypass the protection. This vulnerability enables an attacker to read arbitrary files accessible to the Python process by controlling the resource name parameter passed to `nltk.data.load()` or `nltk.data.find()`. The issue affects applications that rely on NLTK for resource loading, including NLP web applications, Jupyter notebooks, and CLI tools. The default `pathsec.ENFORCE=False` setting exacerbates the impact by not blocking the file read at the `open()` stage.

CVSS v3.0

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

nltk
pkg:pypi/nltk
Affected versions
=3.9.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/07/2026, 11:59:04 UTC

Technical Analysis

CVE-2026-12243 is a path traversal vulnerability in NLTK version 3.9.4 caused by an incomplete fix for a prior issue. The regex `_UNSAFE_NO_PROTOCOL_RE` in nltk/data.py checks for literal '../' sequences but does not detect percent-encoded traversal sequences like '..%2f'. Since the `url2pathname()` function decodes these sequences after the validation step, an attacker can bypass the pathname restriction and cause arbitrary file reads by controlling the resource name parameter passed to `nltk.data.load()` or `nltk.data.find()`. The vulnerability is exacerbated by the default setting `pathsec.ENFORCE=False`, which does not block file reads at the open() stage. This issue affects any application relying on NLTK for resource loading.

Potential Impact

An attacker can read arbitrary files accessible to the Python process by exploiting the path traversal vulnerability in NLTK 3.9.4. This can lead to unauthorized disclosure of sensitive information. There is no indication of integrity or availability impact. The vulnerability is remotely exploitable without privileges or user interaction.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid using NLTK version 3.9.4 in untrusted environments or restrict access to sensitive files. Consider setting `pathsec.ENFORCE=True` if applicable to block unauthorized file reads at the open() stage. Monitor official NLTK channels for updates and apply patches once released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
@huntr_ai
Date Reserved
2026-06-15T06:24:30.096Z
Cvss Version
3.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a431a1b27e9c7971945a790

Added to database: 06/30/2026, 01:21:31 UTC

Last enriched: 07/07/2026, 11:59:04 UTC

Last updated: 08/13/2026, 12:41:08 UTC

Views: 185

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses