Vulnerability DatabaseGHSA-hqh4-75hx-xq46

GHSA-hqh4-75hx-xq46: 
Python vulnerability analysis and mitigation

Impact

memtomem-stm runs executables by bare name while its working directory is the user's project: the LTM server (memtomem-server by default) and stdio upstream servers, started by the proxy, by hooks and by the hook-started daemon, and checked by mms doctor/health probes; claude and codex from mms init, mms add --from-clients, mms import, mms host status|scan|sync, mms prune, mms doctor, register/unregister and eject; and pgrep from the proxy's and daemon's child cleanup. A bare name is resolved through PATH at spawn time, and a relative PATH entry (., an empty segment, bin) is resolved against that working directory. Where the code checks shutil.which(...) first, the check resolves the same way, and the one site that spawns the which result (codex mcp list) receives the same relative path. So in a project an attacker controls, an executable with one of those names placed where a relative PATH entry points runs with the user's privileges when the proxy is started there by an MCP client (LTM server, upstream servers, pgrep) or when one of the commands above runs there.

  • POSIX: requires a relative entry in the user's PATH. Measured on macOS (Python 3, parent cwd = project): with PATH=.:/abs, :/abs or bin:/abs, shutil.which("claude") returned the project's file.
  • Windows: CreateProcess and shutil.which (which the MCP SDK uses for stdio commands) search the current directory for a bare name unless NoDefaultCurrentDirectoryInExePath exists in the environment, so the default configuration is affected. Measured on windows-latest with Python 3.12: without the variable, both shutil.which and a bare-name subprocess spawn picked an executable placed in the current directory over the one on PATH; with the fix, both picked the one on PATH.

Affected call sites (0.7.2)

  • stdio servers: surfacing/mcp_client.py (LTM), proxy/manager.py (upstreams), proxy/toolgraph_provider.py, cli/proxy.py doctor/health probes.
  • claude: src/memtomem_stm/cli/proxy.py registration helpers (mcp get/add/remove), _plugin_bypass_servers (plugin list --json), the scope removal helper, eject restore.
  • codex: proxy.py registration helpers (mcp get/add/remove, get --json, planned commands) and cli/host_bypass.py codex_extra_servers (mcp list --json).
  • pgrep: src/memtomem_stm/utils/child_reaper.py (POSIX only), reached from the proxy and from daemon cleanup.
  • shutil.which presence checks used to choose a path: proxy.py init mode selection, plugin bypass, stdio command check, doctor registration checks. Not affected: the daemon re-spawn uses sys.executable (absolute). Commands configured with a path (./x, /abs/x) are an explicit choice and are run as given.

Patches

At startup STM removes PATH entries that are not fully qualified (relative, empty, drive-relative or root-relative) and, on Windows, sets NoDefaultCurrentDirectoryInExePath. Every lookup STM makes keeps its own rules but no longer consults the current directory, and processes STM starts inherit the hardened PATH. Lookups those processes make later are their own (on Windows a stdio server does not inherit the variable). An upstream server's own configured env.PATH is used as given. A tool reachable only that way is no longer found by STM. An empty or absent PATH, or one with no fully qualified entry left, is replaced by the platform default without its current-directory entry (/bin:/usr/bin; C:\bin on Windows). Not changed: hook commands STM installs (memtomem-stm … or uv run … memtomem-stm …) and MCP registrations written by older versions or by hand are looked up by the client itself, in its own process. Current registrations use an absolute interpreter path.

Workarounds

Remove relative entries (., empty segments, relative or root-relative directories) from PATH. On Windows, define NoDefaultCurrentDirectoryInExePath in the environment the MCP client and your shell start with.


Source: NVD

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-c73q-w75p-j82vHIGH8.8
  • Python logoPython
  • authlib
NoYesOct 30, 2026
GHSA-62m5-6wh8-28x7HIGH7.1
  • Python logoPython
  • pypdf
NoYesOct 30, 2026
GHSA-j72g-pr5x-vf6pMEDIUM5.5
  • Python logoPython
  • mailvigil
NoYesOct 30, 2026
GHSA-rxjw-584q-hxjrMEDIUM4.7
  • JavaScript logoJavaScript
  • @jmrp.io/gitlab-mcp-server
NoYesOct 31, 2026
GHSA-hqh4-75hx-xq46MEDIUMN/A
  • Python logoPython
  • memtomem-stm
NoYesOct 31, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management