PyPI
CVE-2026-109956
NLTK: WekaClassifier passes an unvalidated caller-controlled model path to the weka JVM, bypassing nltk.pathsec containment
- Severity
- High 8.6
- Published
- 27 Oct 2026
- Last changed
- 27 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.10.4
- Exploit chance
- 0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Path traversal (CWE-22)CWE-73
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Read some data · Change data · Slow it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L- Also known as
- GHSA-j456-xh4h-cpf2
- Sources
- OSV.dev and GitHub
Description
WekaClassifier in NLTK passes a caller-controlled model file path to the weka Java VM without any nltk.pathsec validation. WekaClassifier.train puts the caller's model_filename verbatim into the weka argv ["-d", model_filename, ...] (weka writes the trained model there), and WekaClassifier._classify_many puts self._model into ["-l", self._model, ...] (weka reads it). Under nltk.pathsec.ENFORCE=True (the default on current HEAD), NLTK's stated invariant — established by advisory CVE-2026-81726 / GHSA-8mgp-746c-j5xp — is that caller-controlled model-artifact paths must be bounded to the allowed NLTK data roots before any native tool opens them. WekaClassifier is the one java()-based tool wrapper that skips this entirely, giving an untrusted workflow arbitrary-location file write (-d) and an arbitrary file read/parse oracle (-l), defeating pathsec containment.
Affected software
| Software | Affected versions |
|---|---|
nltkPyPI · osv:PyPI:nltk |
|
About nltk
- Weekly downloads (PyPI)
- 11,948,568PyPI Stats, 23 Nov 2026
Vulnerabilities in nltk
- In our list
- 32
- Published in the last 12 months
- 32
- Critical, last 12 months
- 1
- High, last 12 months
- 14
- Known exploited
- 0
- CVE-2026-128135NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data rootHigh 7.1 19 Nov 2026
- CVE-2026-128136NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinksMedium 6.1 19 Nov 2026
- CVE-2026-128137NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinksMedium 5.5 19 Nov 2026
- CVE-2026-128138NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command argumentsCritical 9.8 19 Nov 2026
- CVE-2026-128139NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of serviceHigh 7.5 19 Nov 2026
- CVE-2026-128140NLTK: Downloader cyclic collection indices cause an infinite closure walkMedium 6.5 19 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-109956
- GitHub Advisory Database https://github.com/advisories/GHSA-j456-xh4h-cpf2