CVE-2026-109956: Path Traversal and Sandbox Bypass in NLTK WekaClassifier
Vulnerability ID: GHSA-J456-XH4H-CPF2
CVSS Score: 7.0
Published: 2026-10-27
CVE-2026-109956 (GHSA-j456-xh4h-cpf2) is a path traversal vulnerability and security sandbox bypass in the Python Natural Language Toolkit (NLTK) versions 3.10.3 and earlier. The WekaClassifier module fails to validate caller-controlled model file paths before passing them to the Weka Java Virtual Machine (JVM) via command-line arguments. When operating under the nltk.pathsec security sandbox, this omission permits attackers who control model path parameters to read, probe, or overwrite arbitrary files outside authorized NLTK data directories.
TL;DR
NLTK versions up to 3.10.3 fail to validate model file paths in WekaClassifier.train() and WekaClassifier._classify_many(), bypassing the nltk.pathsec filesystem sandbox and enabling arbitrary file overwrites and local file existence probing via the Weka JVM.
⚠️ Exploit Status: POC
Technical…