NLTK Vulnerability CVE-2026-12243 Allows Arbitrary File Read via Encoded Path Bypass

A high-severity path traversal vulnerability (CVE-2026-12243, CVSS 7.5) has been disclosed in the Natural Language Toolkit (NLTK) for Python, affecting all versions up to and including 3.9.4. The flaw resides in the nltk.data.find() and nltk.data.load() functions, where a security check validates resource name strings before they are decoded, allowing percent-encoded sequences like %2f and %2e%2e to bypass the regex filter entirely. Once past the check, the standard library's url2pathname() decodes these sequences into traversal paths such as ../../../etc/passwd, enabling attackers to read arbitrary files from the host system without authentication. The vulnerability is a classic decode-after-check flaw and represents an incomplete fix for a previously reported path traversal issue tracked under GitHub Issue #3504. NLTK version 3.10.0 addresses the bug, and users are advised to upgrade immediately.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in