Executive brief
IPIPANCorpusReader in NLTK exposes public methods (channels(), domains(), categories(), fileids()) that bypass path security checks and read files via unprotected open() calls. An attacker who can place a symlink in the corpus root directory can read arbitrary files from the filesystem that the process has access to, since the code converts PathPointer objects to plain strings before opening, completely bypassing nltk.pathsec validation.
Affected products
- pip nltk