CVE-2026-129234
Path traversal allows local attacker to execute arbitrary prover9/mace binaries via NLTK.
- CVSS 7.3
- CWE-426
- Input Validation and Sanitization
- Local
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, Prover9Parent.config_prover9 and Mace accept a relative binary_location and pass it to find_binary as path_to_bin, disabling the bare-name absolute-path guard. A local attacker who can plant prover9 or mace4 in the resolved working directory can cause subprocess.Popen to execute that binary with the invoking user's privileges. This issue is fixed in version 3.10.4.
- CWE
- CWE-426
- CVSS base score
- 7.3
- Published
- 2026-11-19
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Command Injection
- Accessibility scope
- Local
- Impact
- Arbitrary Code Execution
- Affected component
- NLTK
- Fixed by upgrading
- Yes
Solution
Upgrade NLTK to version 3.10.4 or later.
Vulnerable code sample
import os
import subprocess
class Prover9Parent:
def config_prover9(self, binary_location):
# VULNERABLE: passes relative path to subprocess without validation
proc = subprocess.Popen([binary_location, "--some-flag"], stdout=subprocess.PIPE)
return proc.communicate()[0]Patched code sample
import os
import subprocess
class Prover9Parent:
def config_prover9(self, binary_location):
# FIX: enforce absolute path before invoking subprocess
if not os.path.isabs(binary_location):
raise ValueError("binary_location must be an absolute path")
proc = subprocess.Popen([binary_location, "--some-flag"], stdout=subprocess.PIPE)
return proc.communicate()[0]Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Resolve every executed tool binary absolute-only and refuse '..' matches (nltk/nltk)
nltk/inference/prover9.py · Prover9Parent._find_binary,nltk/internals.py,nltk/internals.py · config_java,nltk/internals.py · find_binary_absolute,nltk/internals.py · find_file_iter,nltk/tag/hunpos.py,nltk/tag/hunpos.py · HunposTagger.__init__ - Resolve the JVM before spawning it, and spawn it trusted (nltk/nltk)
nltk/internals.py,nltk/internals.py · find_file_iter,nltk/internals.py · java - Audit every spawn: PATH walk without which, pathsec-gated locations, hook (nltk/nltk)
nltk/internals.py,nltk/internals.py · absolute_tool_dir,nltk/internals.py · find_binary_absolute,nltk/internals.py · find_file_iter,nltk/internals.py · _path_dirs_iter,nltk/parse/dependencygraph.py,nltk/parse/dependencygraph.py · dot2img,nltk/pathsec.py,nltk/pathsec.py · is_private_dir,nltk/pathsec.py · resolve_trusted_executable,nltk/pathsec.py · _resolve_private,nltk/pathsec.py · _resolve_trusted_nonposixand 4 more - Reject a relative tool binary_location in prover9/mace, megam and tadm (nltk/nltk)
nltk/classify/megam.py,nltk/classify/megam.py · config_megam,nltk/classify/tadm.py,nltk/classify/tadm.py · config_tadm,nltk/inference/prover9.py · Prover9Parent.config_prover9,nltk/internals.py
Cite this entry
@misc{vaitp:cve2026129234,
title = {{Path traversal allows local attacker to execute arbitrary prover9/mace binaries via NLTK.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-129234},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-129234/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
