5.4medium
OpenClaw < 2026.4.20 - Arbitrary Code Execution via MCP stdio Environment Variables
- Severity
- 5.4medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.14% (higher than 3% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-mj59-h3q9-ghfh
Description
OpenClaw before 2026.4.20 contains an improper environment variable validation vulnerability in MCP stdio server configuration that allows attackers to execute arbitrary code. Malicious workspace configurations can pass dangerous startup variables like NODE_OPTIONS, LD_PRELOAD, or BASH_ENV to spawned MCP server processes, enabling code injection when operators start sessions using those servers.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OpenClaw OpenClaw | before 2026.4.20 Not affected: 2026.4.20 | CVE List, NVD |
| openclaw (npm) | before 2026.4.20 | GitHub Advisory Database |
All scores
| VulnCheck | 5.4medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 7.3high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Classification
What each source says
CVE List
OpenClaw before 2026.4.20 contains an improper environment variable validation vulnerability in MCP stdio server configuration that allows attackers to execute arbitrary code. Malicious workspace configurations can pass dangerous startup variables like NODE_OPTIONS, LD_PRELOAD, or BASH_ENV to spawned MCP server processes, enabling code injection when operators start sessions using those servers.
GitHub Advisory Database
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.
NVD (es)
OpenClaw anterior a 2026.4.20 contiene una vulnerabilidad de validación de variable de entorno incorrecta en la configuración del servidor stdio de MCP que permite a los atacantes ejecutar código arbitrario. Las configuraciones de espacio de trabajo maliciosas pueden pasar variables de inicio peligrosas como NODE_OPTIONS, LD_PRELOAD o BASH_ENV a procesos de servidor MCP generados, lo que permite la inyección de código cuando los operadores inician sesiones usando esos servidores.
References
| https://github.com/openclaw/openclaw/security/advisories/GHSA-mj59-h3q9-ghfh | third-party-advisory, vendor-advisory, web | |
| https://github.com/openclaw/openclaw/commit/62fa5071896e95edc7f67d1cebc70a2859e283af | patch, web | |
| https://github.com/openclaw/openclaw/commit/85d86ebc4bf3d2226d39d132a484f4f7a299fa1b | broken-link, patch, web | |
| https://www.vulncheck.com/advisories/openclaw-arbitrary-code-execution-via-mcp-stdio-environment-variables | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-44995 | advisory | |
| https://github.com/openclaw/openclaw | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-44995 changed 2026-05-11 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mj59-h3q9-ghfh changed 2026-05-19 | CC-BY-4.0 |
| NVD | CVE-2026-44995 changed 2026-11-11 | Public domain |