
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-12243 is a path traversal vulnerability in NLTK (Natural Language Toolkit) version 3.9.4 that allows unauthenticated remote attackers to read arbitrary files accessible to the Python process. The flaw stems from an incomplete fix for GitHub Issue #3504, where the _UNSAFE_NO_PROTOCOL_RE regex in nltk/data.py fails to account for percent-encoded traversal sequences (e.g., ..%2f). It was published on June 30, 2026, and carries a CVSS v3.0 base score of 7.5 (High) (GitHub Advisory, Red Hat Bugzilla).
The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), specifically a validation bypass via URL encoding (CAPEC-64, CAPEC-78). The _UNSAFE_NO_PROTOCOL_RE regex in nltk/data.py checks only for literal ../ sequences, but the url2pathname() function decodes percent-encoded sequences (e.g., ..%2f → ../) after the validation step, allowing the check to be trivially bypassed. An attacker who can control the resource parameter passed to nltk.data.load() or nltk.data.find() — for example, via a web API backed by an NLP application — can supply a crafted path to read arbitrary files. The default pathsec.ENFORCE=False configuration means no secondary protection blocks the file read at the open() stage (GitHub Advisory, Huntr Bounty).
Successful exploitation results in unauthorized disclosure of arbitrary files readable by the Python process running NLTK, including sensitive configuration files, credentials, private keys, or application source code. The vulnerability has no impact on integrity or availability, but the confidentiality impact is rated High. Affected application types include NLP web applications, Jupyter notebooks, and CLI tools that expose NLTK resource loading to external input (GitHub Advisory, Red Hat Bugzilla).
nltk.data.load() or nltk.data.find()._UNSAFE_NO_PROTOCOL_RE regex, e.g., ..%2f..%2f..%2fetc%2fpasswd instead of ../../../etc/passwd.nltk.data.load() or nltk.data.find().../; the url2pathname() function subsequently decodes %2f to /, resolving the traversal path.pathsec.ENFORCE=False (the default), no secondary check blocks the open() call, and the contents of the targeted file are returned to the attacker (Huntr Bounty, GitHub Advisory)...%2f, ..%252f) in parameters that are passed to NLTK resource loading functions; unusual outbound data transfers from NLP application servers.nltk.data.load() or nltk.data.find() calls with resource names containing %2f, %252f, or other encoded slash variants; file access log entries for sensitive system files (e.g., /etc/passwd, /etc/shadow, application config files) by the Python process./usr/share/nltk_data or ~/nltk_data) as observed via system call tracing (strace, auditd) (GitHub Advisory, Red Hat Bugzilla).Upgrade NLTK to a patched version that properly validates percent-encoded path traversal sequences (check the official NLTK repository for the fixed release). As an immediate workaround, set pathsec.ENFORCE=True in your application to add a secondary protection layer that blocks unsafe file reads at the open() stage. Additionally, restrict and validate resource names passed to nltk.data.load() and nltk.data.find() using an allowlist of expected values, and avoid exposing these functions to untrusted user input (GitHub Advisory, Red Hat Bugzilla).
Red Hat has tracked this vulnerability via their Bugzilla system (Bug 2494748) with a high severity/priority rating and assigned it to their Product Security DevOps Team, indicating active triage for downstream impact on Red Hat products. The vulnerability was disclosed through the Huntr bug bounty platform and received coverage from automated CVE tracking services. No notable independent researcher commentary or significant social media discussion beyond standard CVE aggregation has been identified at this time (Red Hat Bugzilla, Huntr Bounty).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."