NLTK: Path traversal in WekaClassifier model path handling
Summary
NLTK, a Python library for natural language processing, contains a path traversal flaw in its WekaClassifier. Model paths are passed unvalidated to the Weka Java tool, which bypasses NLTK's pathsec containment. An attacker who controls the model path can write files to arbitrary locations or check whether files exist outside the allowed data directories. This only matters where an application passes untrusted input into WekaClassifier and Java and Weka are installed.
Affected
- NLTK up to and including 3.10.3
- Component: nltk.classify.weka.WekaClassifier
Fixed in
- NLTK 3.10.4 (per the GitHub advisory; the OSV record lists 3.10.3, which conflicts with the advisory)
- Distribution packages: Unknown. Check your distro tracker for backported fixes.
Workaround
- No official workaround. Upgrade to NLTK 3.10.4 or later.
- Do not pass model paths derived from untrusted input to WekaClassifier.
- A third-party suggestion is to validate model paths with nltk.pathsec.validate_tool_path() in application code; this has not been verified against NLTK's code.
Exploitation
- No evidence of active exploitation in the wild; not listed as known exploited by one aggregator.
- A public proof-of-concept write-up exists; it has not been independently reproduced here.
- CISA SSVC: exploitation status poc, not automatable.
Our recommendation
- Identify all environments that install or pin NLTK (pip show nltk, lockfiles, container images).
- Upgrade NLTK to 3.10.4 or later, or apply the distro patch once available.
- If WekaClassifier is used, ensure model paths come only from trusted, fixed sources.
- Recheck the NVD record and the GitHub advisory for final affected-range data.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-j456-xh4h-cpf2 github.com
- VulnCheck advisory: NLTK Path Traversal via WekaClassifier www.vulncheck.com
- OSV: GHSA-j456-xh4h-cpf2 osv.dev
- Ubuntu CVE tracker: CVE-2026-109956 ubuntu.com
- cvereports write-up on GHSA-j456-xh4h-cpf2 cvereports.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 13:52.
Original description (NVD)
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 model_filename or model argument can make the weka JVM write files via -d or probe files via -l outside allowed data roots.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
