{"vuln_id":"GHSA-cc5r-64rf-75hg","aliases":["CVE-2026-129234","GHSA-6hwm-xvph-95vm"],"description":"NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location","published_at":"2026-11-19T23:46:54Z","modified_at":"2026-11-20T00:00:04.076335Z","first_seen_at":"2026-11-21T19:15:19.371457Z","severity":"high","severity_source":"ghsa","cvss_score":7.3,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-426","CWE-427"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-cc5r-64rf-75hg"},"matched_alias":null,"items":[{"id":10703,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-cc5r-64rf-75hg: NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location","summary":"NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location\n\n## Summary\n`Prover9Parent.config_prover9(binary_location=...)` (and `Mace`, which inherits it) accepts a relative `binary_location` and passes it as `path_to_bin` to `find_binary`, which disables the CWD-relative rejection guard. Unlike the boxer/senna/malt/repp siblings, prover9/mace apply no `os.path.isabs()` filter, so the resolved relative program path (e.g. `./prover9`) is executed from the current working directory via `subprocess.Popen`. A local attacker who can plant `./prover9` (or `./mace4`) in the resolved directory achieves local code execution.\n\n## Root Cause\n`nltk/inference/prover9.py:121-135` calls `find_binary(name, path_to_bin=binary_location, env_vars=[\"PROVER9\"], ...)`. A truthy `path_to_bin` sets `searching_bare_name = not path_to_bin and ...` → False (`internals.py:935`), so the guard `if searching_bare_name and not os.path.isabs(path): continue` (`internals.py:940`) never runs. The result is stored in `self._prover9_bin`; on the next `prove()`, `_call` → `subprocess.Popen([binary]+args, ...)` (`prover9.py:207`) execs it. `Mace(Prover9Parent)` inherits `config_prover9` (`mace.py:229`). By contrast boxer's `_find_binary` (`sem/boxer.py:251-266`) iterates `find_binary_iter` and returns only the first `os.path.isabs()` result; repp/malt/senna similarly reject a relative explicit bin dir. prover9/mace have no such filter.\n\n## Impact\nLocal arbitrary code execution: an attacker-planted `./prover9`/`./mace4` runs as the invoking user when the application is configured with a relative `binary_location` and the attacker can write to the resolved directory.\n\n## Proof of Concept\nIn a directory containing an executable `./prover9`:\n```python\nfrom nltk.inference.prover9 import Prover9\np = Prover9(); p.config_prover9(binary_location='.')\n# p._prover9_bin == './prover9'; subsequent prove() Popens it from CWD\n```\nRuntime-confirmed: `find_binary('prover9', path_to_bin='.')` → `'./prover9'`; bare `find_binary('prover9')` and relative `PROVER9='.'` via default `_find_binary` both raise `LookupError` (the default path is protected).\n\n## Attack Chain\n1. Entry: app calls `config_prover9(binary_location=\n)` / `config_mace(...)`. Guard: CWD-rejection in `find_binary_iter`. Bypass proof: truthy `path_to_bin` sets `searching_bare_name=False` → filter never runs.\n2. Resolution: `find_binary` returns `'./prover9'`. Guard: boxer's `if os.path.isabs(binary): return`. Bypass proof: prover9/mace have no such loop — relative first match stored verbatim.\n3. Sink: `subprocess.Popen(['./prover9']+args)` (prover9.py:207) — separator-containing path ⇒ execvp runs it relative to CWD, bypassing `$PATH`.\n4. Impact: planted `./prover9`/`./mace4` executes = local code execution.\n\n## Bypass Evidence\nRuntime: `find_binary('prover9', path_to_bin='.') -> './prover9'`; `find_binary('prover9') -> LookupError`. `git log -- nltk/inference/prover9.py nltk/inference/mace.py` shows only copyright/formatting commits — no security fix. GHSA-6hwm-xvph-95vm (CWE-426/427) is\n\nAffected: PyPI:nltk\n\nFixed in: 3.10.4\n\nReferences:\nhttps://github.com/nltk/nltk/security/advisories/GHSA-cc5r-64rf-75hg\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-129234\nhttps://github.com/nltk/nltk/pull/3887\nhttps://github.com/nltk/nltk/commit/4ca190b744ec72500c4c8a8259aece7792a46877\nhttps://github.com/nltk/nltk/commit/992884a02f6fb5180a992ed12d20103b4b5cb8a0\nhttps://github.com/nltk/nltk/commit/d4f0309bb8649f77e88c2c435e5fa31e6c5ab225\nhttps://github.com/nltk/nltk/commit/f0a75c66506977c0f683281c0f5275dbfbaee3b2\nhttps://github.com/nltk/nltk","url":"https://osv.dev/vulnerability/GHSA-cc5r-64rf-75hg","published_at":"2026-11-19T23:46:54Z","updated_at":"2026-11-20T00:00:04.076335Z","fetched_at":"2026-11-21T19:15:55.946116Z","severity":"high","cvss_score":7.3,"epss":0.00225,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-129234","vuln_ids":["CVE-2026-129234","GHSA-6HWM-XVPH-95VM","GHSA-CC5R-64RF-75HG"],"tags":["osv","pypi","fix-available"],"cluster_id":2160,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10703","html":"https://vulnwatch.ve1ve2.com/item/10703"}},{"id":2367,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-cc5r-64rf-75hg / CVE-2026-129234: NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location","summary":"NLTK: Untrusted search path in prover9/mace4 config allows local code execution via relative binary_location\n\n## Summary\n`Prover9Parent.config_prover9(binary_location=...)` (and `Mace`, which inherits it) accepts a relative `binary_location` and passes it as `path_to_bin` to `find_binary`, which disables the CWD-relative rejection guard. Unlike the boxer/senna/malt/repp siblings, prover9/mace apply no `os.path.isabs()` filter, so the resolved relative program path (e.g. `./prover9`) is executed from the current working directory via `subprocess.Popen`. A local attacker who can plant `./prover9` (or `./mace4`) in the resolved directory achieves local code execution.\n\n## Root Cause\n`nltk/inference/prover9.py:121-135` calls `find_binary(name, path_to_bin=binary_location, env_vars=[\"PROVER9\"], ...)`. A truthy `path_to_bin` sets `searching_bare_name = not path_to_bin and ...` → False (`internals.py:935`), so the guard `if searching_bare_name and not os.path.isabs(path): continue` (`internals.py:940`) never runs. The result is stored in `self._prover9_bin`; on the next `prove()`, `_call` → `subprocess.Popen([binary]+args, ...)` (`prover9.py:207`) execs it. `Mace(Prover9Parent)` inherits `config_prover9` (`mace.py:229`). By contrast boxer's `_find_binary` (`sem/boxer.py:251-266`) iterates `find_binary_iter` and returns only the first `os.path.isabs()` result; repp/malt/senna similarly reject a relative explicit bin dir. prover9/mace have no such filter.\n\n## Impact\nLocal arbitrary code execution: an attacker-planted `./prover9`/`./mace4` runs as the invoking user when the application is configured with a relative `binary_location` and the attacker can write to the resolved directory.\n\n## Proof of Concept\nIn a directory containing an executable `./prover9`:\n```python\nfrom nltk.inference.prover9 import Prover9\np = Prover9(); p.config_prover9(binary_location='.')\n# p._prover9_bin == './prover9'; subsequent prove() Popens it from CWD\n```\nRuntime-confirmed: `find_binary('prover9', path_to_bin='.')` → `'./prover9'`; bare `find_binary('prover9')` and relative `PROVER9='.'` via default `_find_binary` both raise `LookupError` (the default path is protected).\n\n## Attack Chain\n1. Entry: app calls `config_prover9(binary_location=\n)` / `config_mace(...)`. Guard: CWD-rejection in `find_binary_iter`. Bypass proof: truthy `path_to_bin` sets `searching_bare_name=False` → filter never runs.\n2. Resolution: `find_binary` returns `'./prover9'`. Guard: boxer's `if os.path.isabs(binary): return`. Bypass proof: prover9/mace have no such loop — relative first match stored verbatim.\n3. Sink: `subprocess.Popen(['./prover9']+args)` (prover9.py:207) — separator-containing path ⇒ execvp runs it relative to CWD, bypassing `$PATH`.\n4. Impact: planted `./prover9`/`./mace4` executes = local code execution.\n\n## Bypass Evidence\nRuntime: `find_binary('prover9', path_to_bin='.') -> './prover9'`; `find_binary('prover9') -> LookupError`. `git log -- nltk/inference/prover9.py nltk/inference/mace.py` shows only copyright/formatting commits — no security fix. GHSA-6hwm-xvph-95vm (CWE-426/427) is\n\nAffected packages: pip:nltk\nPatched: nltk 3.10.4","url":"https://github.com/advisories/GHSA-cc5r-64rf-75hg","published_at":"2026-11-19T23:46:54Z","updated_at":"2026-11-19T23:46:56Z","fetched_at":"2026-11-21T19:15:18.416783Z","severity":"high","cvss_score":7.3,"epss":0.00225,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-129234","vuln_ids":["CVE-2026-129234","GHSA-6HWM-XVPH-95VM","GHSA-CC5R-64RF-75HG"],"tags":["ghsa","pip","CWE-426","CWE-427"],"cluster_id":2160,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2367","html":"https://vulnwatch.ve1ve2.com/item/2367"}},{"id":8974,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-129234: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Proc…","summary":"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.\n\nReferences:\nhttps://github.com/nltk/nltk/commit/4ca190b744ec72500c4c8a8259aece7792a46877\nhttps://github.com/nltk/nltk/commit/992884a02f6fb5180a992ed12d20103b4b5cb8a0\nhttps://github.com/nltk/nltk/commit/d4f0309bb8649f77e88c2c435e5fa31e6c5ab225\nhttps://github.com/nltk/nltk/commit/f0a75c66506977c0f683281c0f5275dbfbaee3b2\nhttps://github.com/nltk/nltk/pull/3887\nhttps://github.com/nltk/nltk/releases/tag/v3.10.4\nhttps://github.com/nltk/nltk/security/advisories/GHSA-cc5r-64rf-75hg","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129234","published_at":"2026-11-19T17:17:56.343000Z","updated_at":"2026-11-19T21:17:49.030000Z","fetched_at":"2026-11-21T19:15:31.484638Z","severity":"high","cvss_score":7.3,"epss":0.00225,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-129234","vuln_ids":["CVE-2026-129234","GHSA-6HWM-XVPH-95VM","GHSA-CC5R-64RF-75HG"],"tags":["CWE-426","CWE-427"],"cluster_id":2161,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8974","html":"https://vulnwatch.ve1ve2.com/item/8974"}}]}