Path traversal in Natural Language Toolkit - CVE-2026-12072
Published: November 22, 2026
Vulnerability details
The vulnerability allows a remote attacker to bypass NLTK's strict path sandbox and read parsed NKJP header content from outside the corpus root.
The vulnerability exists due to path traversal in NKJPCorpusReader when it resolves fileids without checking path containment and opens files without invoking sandbox validation. A remote attacker can influence an application's corpus file selection to retrieve out-of-root header content or cause other reader methods to open and read out-of-root files without returning their contents.