NLTK's Weka classifier can read and write model files outside allowed folders
A Python language tool called NLTK can be tricked into saving or loading a model file in any folder on the computer, even folders it should block. If the file path comes from untrusted input, an attacker can write files to unexpected places
| Severity | HighCVSS 8.6 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yesnltk 3.10.4 · since 27 Oct 2026 |
| How sure is this? | Official sourceBacked by an official source |
What happened
In NLTK, WekaClassifier passes a caller-supplied model path directly to the Java-based Weka tool (-d for write, -l for read) without the path validation that other NLTK tool wrappers use, bypassing NLTK's pathsec containment.
Are you affected?
You are affected if you use NLTK's WekaClassifier (pip package nltk up to 3.10.3) and any part of the model file path comes from untrusted users or workflows.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| nltk · pip | <= 3.10.3 | 3.10.4 |
What to do
- Update nltk to 3.10.4 or later
- Until updated, do not pass user-controlled values as Weka model file paths
- Restrict the process running NLTK to only the folders it needs
Timeline
- 27 Oct 2026, 14:50 UTCPublicly disclosed
- 27 Oct 2026, 14:50 UTCReported by GitHub Advisory · GitHub Advisory
- 27 Oct 2026, 14:51 UTCPicked up by Zero Radar
Sources 1 report, oldest first
Official vendor, government CERT or advisory database
- NLTK: WekaClassifier passes an unvalidated caller-controlled model path to the weka JVM, bypassing nltk.pathsec containmentGitHub Advisory · 27 Oct 2026, 14:50 UTC
Technical details
- ID
- GHSA-j456-xh4h-cpf2
- CVSS
- 8.6 / 10
- Disclosed
- 27 Oct 2026, 14:50 UTC
- On Zero Radar
- 27 Oct 2026, 14:51 UTC (1 min after disclosure)
- Last change
- 27 Oct 2026, 14:51 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works