CVE-2026-44995: OpenClaw: MCP stdio server env could load dangerous startup variables from workspace config
OpenClaw before 2026.4.20 lets a workspace's MCP stdio configuration pass startup variables such as `NODE_OPTIONS`, `LD_PRELOAD` or `BASH_ENV` to the MCP server it spawns. A malicious workspace can make that child process load attacker code when you start a session that uses the server. Upgrade to openclaw 2026.4.20.
Published Apr 25, 2026 · Updated May 19, 2026 · Analysis Oct 29, 2026
What an attacker can do
OpenClaw can launch local MCP servers over stdio, using an env block from the workspace's MCP configuration. Before the fix, that block was passed to the child process as written. Several environment variables change what a process loads when it starts. NODE_OPTIONS can preload a Node.js module, LD_PRELOAD can inject a shared library and BASH_ENV makes Bash run a script. A repository that ships an MCP config setting one of these runs its own code the moment the MCP server starts.
The attacker needs the operator to open OpenClaw in the malicious workspace and start a session that uses that MCP server. The code then runs as the operator, with access to their files, tokens and SSH keys. The CVSS 4.0 vector shows local access, low privileges and user action, with high confidentiality, integrity and availability impact on the host. The advisory notes the limit: the issue stays inside the local or workspace trust boundary, so it rates medium, not high.
Developers who clone unfamiliar projects and let an agent start their MCP servers are the typical victims. The same applies to CI jobs that run OpenClaw in a checked-out pull request.
Who is affected
The openclaw npm package before 2026.4.20. You are exposed when you run OpenClaw in a workspace whose MCP configuration defines stdio servers with an env section you did not write.
npm ls openclawAlso review workspace MCP config files for NODE_OPTIONS, LD_PRELOAD, BASH_ENV or similar entries.
openclaw
- Ecosystem
- npm
- Affected
- < 2026.4.20
- Fixed in
- 2026.4.20
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.4.20:
npm install [email protected]The fix commits are 62fa5071896e95edc7f67d1cebc70a2859e283af and 85d86ebc4bf3d2226d39d132a484f4f7a299fa1b. OpenClaw now filters MCP stdio environment entries through the host environment safety denylist before it spawns stdio MCP servers. The advisory lists no workaround. Until you upgrade, read a workspace's MCP configuration before starting a session in it.
How to tell if you were hit
Search workspace MCP configuration files for stdio servers whose env block sets NODE_OPTIONS, LD_PRELOAD or BASH_ENV. On a host that may have been hit, review child processes of OpenClaw for MCP servers started with unexpected preload modules or libraries, and for unfamiliar scripts or network connections spawned alongside them. The advisory names no log signature.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Affected Packages / Versions
- Package:
openclaw(npm) - Affected versions:
< 2026.4.20 - Patched version:
2026.4.20
Impact
Workspace MCP stdio configuration could pass dangerous process-startup environment variables such as NODE_OPTIONS, LD_PRELOAD, or BASH_ENV to the spawned MCP server process. In a malicious workspace, this could make the MCP child load attacker-controlled code when the operator starts a session that uses that MCP server.
The impact is limited to local/workspace trust boundaries and requires the operator to run OpenClaw in a workspace containing the malicious MCP configuration. Severity is therefore medium, not high/critical.
Fix
OpenClaw now filters MCP stdio environment entries through the host environment safety denylist before spawning stdio MCP servers.
Fix commits:
62fa5071896e95edc7f67d1cebc70a2859e283af85d86ebc4bf3d2226d39d132a484f4f7a299fa1b
Release
Fixed in OpenClaw 2026.4.20.
Credited to garagon.
Questions
- Does CVE-2026-44995 need the attacker on my machine?
No, but it needs you to open OpenClaw in the attacker's workspace and start a session that uses its MCP server. The advisory describes a local or workspace trust boundary.
- Which variables are the problem?
The advisory names
NODE_OPTIONS,LD_PRELOADandBASH_ENV, which make a starting process load attacker-controlled code.- Why is it rated medium?
The advisory says it stays inside local and workspace trust boundaries and needs the operator to run OpenClaw in the malicious workspace.
- What does the fix do?
It filters MCP stdio environment entries through the host environment safety denylist before spawning the server. Fixed in 2026.4.20.
References
Read for this analysis:
- https://github.com/openclaw/openclaw/commit/62fa5071896e95edc7f67d1cebc70a2859e283af
- https://github.com/openclaw/openclaw/commit/85d86ebc4bf3d2226d39d132a484f4f7a299fa1b
- https://nvd.nist.gov/vuln/detail/CVE-2026-44995
- https://www.vulncheck.com/advisories/openclaw-arbitrary-code-execution-via-mcp-stdio-environment-variables
- https://github.com/advisories/GHSA-mj59-h3q9-ghfh
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
