{"vuln_id":"GHSA-6hwm-xvph-95vm","aliases":[],"description":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-11-21T19:15:19.373364Z","severity":"unknown","severity_source":null,"cvss_score":null,"cvss_vector":null,"cwe":[],"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-6hwm-xvph-95vm"},"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":2488,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-7mxv-7h3q-9324 / CVE-2026-128134: NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element","summary":"NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element\n\n## Summary\n\n`nltk.parse.dependencygraph.dot2img` invokes the Graphviz `dot` executable without the trusted-execution guarantees that NLTK applies to its other native-tool wrappers. The function resolves `dot` by bare name and then runs the resolved absolute path with a raw `subprocess.run`, omitting the ownership/writability check and the loader-environment scrub that `nltk.pathsec.spawn_trusted` provides. On a POSIX host, a local, unprivileged actor who can write to any group/world-writable directory that appears on the victim's `PATH` can plant a trojan `dot`; when the victim later renders a `DependencyGraph` (for example in a Jupyter notebook, which auto-invokes `_repr_svg_`) or calls `dot2img` directly, the planted binary executes as the victim. The advisory GHSA-6hwm-xvph-95vm (CVE-2026-78680) addressed the same untrusted-search-path class for the Graphviz `dot` invoker in `nltk/translate/api.py`, but `dot2img` received only part of that remediation and remains exploitable.\n\n## Root Cause\n\nNLTK's native-tool security model layers four defenses (documented in `nltk/EXTERNAL_TOOL_SECURITY.md`): (1) `find_binary` refuses a current-working-directory-relative match; (2) `resolve_trusted_executable` verifies the resolved file is a regular file that no other unprivileged user can replace (private parent directories, owner is the user or root, no group/world write bit); (3) shell execution is refused; (4) `safe_env` scrubs loader and interpreter environment variables before exec. Layers 2, 3, and 4 are reached only through `nltk.pathsec.spawn_trusted`. `dot2img` calls `find_binary(\"dot\")` (layer 1 only), then executes the result with `subprocess.run([dot_binary, ...])` and no `env=` argument. Layer 1 rejects only non-absolute matches, so an absolute path returned by the `which` search stage survives even when the file lives in a writable directory. Because `dot2img` never calls `spawn_trusted`, the ownership check and environment scrub never run.\n\n```text\nnltk/parse/dependencygraph.py:626   dot_binary = find_binary(\"dot\")          # layer 1 only\nnltk/parse/dependencygraph.py:631   subprocess.run([dot_binary, \"-T%s\" % t], ...)   # no trust check, no env=\nnltk/parse/dependencygraph.py:638   subprocess.run([dot_binary, \"-T%s\" % t], ...)   # binary-format branch, same gap\nnltk/internals.py:1034              if searching_bare_name and not os.path.isabs(path): continue  # skips only relative matches\nnltk/translate/api.py:145           process = spawn_trusted(dot_binary, [f\"-T{output_format}\"], ...)  # hardened sibling\n```\n\n## Impact\n\nPrerequisites: a POSIX host on which the attacker is a local, unprivileged user (or code) able to write to a group/world-writable directory that appears on the victim's `PATH`. This includes the commonly cited case of a Homebrew `/usr/local/bin` with `drwxrwxr-x` permissions, or a writable directory placed early on `PATH`. The attacker plants a trojan `dot` there. When the victim renders a `DependencyGraph` (notebook `_repr_s\n\nAffected packages: pip:nltk\nPatched: nltk 3.10.4","url":"https://github.com/advisories/GHSA-7mxv-7h3q-9324","published_at":"2026-11-16T18:45:51Z","updated_at":"2026-11-16T18:45:54Z","fetched_at":"2026-11-21T19:15:18.416877Z","severity":"high","cvss_score":8.5,"epss":0.00184,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-128134","vuln_ids":["CVE-2026-128134","CVE-2026-78680","GHSA-6HWM-XVPH-95VM","GHSA-7MXV-7H3Q-9324"],"tags":["ghsa","pip","CWE-426","CWE-427"],"cluster_id":2414,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2488","html":"https://vulnwatch.ve1ve2.com/item/2488"}}]}