Path traversal in Natural Language Toolkit - CVE-2026-54294
Published: August 7, 2026
Vulnerability details
The vulnerability allows a remote attacker to disclose sensitive information.
The vulnerability exists due to path traversal in NKJPCorpusReader when processing attacker-influenced fileids in public read methods. A remote attacker can supply crafted fileids containing directory traversal sequences to disclose sensitive information.
The issue bypasses the nltk.pathsec sandbox even when ENFORCE is set to true, and the header() method returns content from out-of-root files to the caller.