Path Traversal Vulnerability in NLTK Affects Python Applications and Services
CVE-2026-12243

7.5HIGH

Key Information:

Vendor

Nltk

Status
Vendor
CVE Published:
30 June 2026

What is CVE-2026-12243?

NLTK version 3.9.4 is susceptible to path traversal due to an incomplete fix for a previous issue. The vulnerability arises from the _UNSAFE_NO_PROTOCOL_RE regex, which only checks for literal '../' sequences but ignores percent-encoded traversal sequences like '..%2f'. As a result, the url2pathname() function allows for decoding these sequences after validation, enabling attackers to manipulate the resource name parameter in nltk.data.load() or nltk.data.find(). This flaw permits unauthorized access to files that the Python process can read, affecting various applications dependent on NLTK for resource management, including NLP web applications, Jupyter notebooks, and command-line interface tools. The impact is further exacerbated when the pathsec.ENFORCE=False setting does not block file reads during the opening phase.

Affected Version(s)

nltk/nltk <= unspecified

References

CVSS V3.0

Score:
7.5
Severity:
HIGH
Confidentiality:
High
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.