CVE-2026-54293 NLTK: URL-Encoded Path Traversal in nltk.data.load() Allows Arbitrary Local File Read

High 7.5 Published Updated

Attackers can read arbitrary local files by bypassing path traversal checks in nltk.data.load() using URL-encoded sequences.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-54293?

CVE-2026-54293 is a high-severity path traversal vulnerability in nltk, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.0-rc1, nltk.data.load() in NLTK is vulnerable to path traversal via URL-encoded path separators and traversal segments when using the nltk: URL scheme. The unsafe-path regex check is performed before url2pathname() decodes the %xx sequences (a classic decode-after-check / TOCTOU-style flaw), allowing an attacker to bypass the protection documented in NLTK's SECURITY.md and read arbitrary files from the filesystem. While literal traversal strings such as ../../../etc/passwd are correctly blocked, encoded variants such as %2fetc%2fpasswd, %2e%2e%2f..., and ..%2f..%2f slip past the regex and are subsequently decoded into a real filesystem path. This vulnerability is fixed in 3.10.0-rc1.

Weakness: CWE-22

Which versions are affected by CVE-2026-54293?

3 open source packages ship an affected version, including nltk. It affects 1 product.

PackageAffectedFixed in
nltk PyPIAll versions3.10.0
nltk PyPIAll versions3.10.0
nltk PyPIAll versions3.10.0
Linux distribution packages (1)
python-nltk openSUSE:TumbleweedAll versions3.10.0rc1-1.1

Products include Nltk Nltk.

How do I fix CVE-2026-54293?

Upgrade nltk to 3.10.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-54293 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54293 exists.

Sources

Also known as DEBIAN-CVE-2026-54293, ECHO-c124-c77b-21c5, GHSA-p4gq-832x-fm9v, MGASA-2026-0281, MINI-q3j8-72fp-8x53, PYSEC-2026-2078 and 2 more.

Is CVE-2026-54293 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free