Path traversal in Natural Language Toolkit - #VU169291
Published: November 22, 2026
Vulnerability details
The vulnerability allows a remote attacker to create or overwrite files outside the permitted NLTK data directories and infer whether out-of-directory files exist or can be parsed as Weka models.
The vulnerability exists due to missing model-path containment checks in NLTK's WekaClassifier when it passes caller-supplied paths to Weka for model saving or loading. A remote attacker can supply a model path outside the permitted directories to write a serialized model during training or observe file-loading behavior during classification without receiving raw file contents.