CVE-2026-109956: NLTK through 3.10.3 Path Traversal via WekaClassifier Model Path
NLTK through 3.10.3 contains a path traversal vulnerability in WekaClassifier that allows attackers to bypass nltk.pathsec containment by supplying unvalidated model paths. Attackers controlling the modelfilename or model argument can make the weka JVM write files via -d or probe files via -l outside allowed data roots.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using NLTK WekaClassifier are exposed when an attacker can control the model_filename or model argument. The issue affects NLTK through version 3.10.3.
What does an attacker need to exploit it?
The attacker needs the ability to supply an unvalidated model path through the model_filename or model argument. Exploitation does not require authentication or user interaction, but the attack complexity is rated high.
What could exploitation allow?
An attacker can bypass nltk.pathsec containment and access paths outside the intended data roots. The Weka JVM can be directed to write files using -d or probe files using -l.
What can be done while a patch is unavailable?
Do not allow untrusted input to control WekaClassifier model_filename or model values. Validate and constrain model paths to approved locations before passing them to WekaClassifier.