ADVISORYHIGH8d ago · Sep 8, 2026
NLTK: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root

Developers with symlinks inside an NLTK corpus root expose arbitrary local files through CorpusReader.
nltk.corpus.reader.api.CorpusReader.open() can be used to read files outside the intended corpus root via a symlink placed inside that root. Although NLTK blocks absolute paths and .. traversal, the current boundary check is only lexical and does…
Read it at nltk