OpenClaw: The "Helpful" Path to Remote Code Execution
Vulnerability ID: GHSA-JQPQ-MGVM-F9R6
CVSS Score: 7.8
Published: 2026-02-18
OpenClaw, an open-source platform for agent-based automation, suffered from a critical set of design flaws centered around how it handled the system PATH variable. By prioritizing local directories over system paths and allowing request-scoped environment overrides, the platform opened the door to classic binary hijacking and arbitrary code execution. This analysis covers the three distinct vectors: unsafe bootstrapping, relative command resolution, and environment injection.
TL;DR
OpenClaw versions prior to v2026.2.14 are vulnerable to Local Privilege Escalation and RCE via PATH manipulation. The software automatically trusted local node_modules binaries over system executables and allowed external agents to override the PATH environment variable during execution. Attackers can hijack commands to execute arbitrary code.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-427 / CWE-78
- Attack Vector: Local & Network
- CVSS Score: 7.8 (High)
- Exploit Maturity: Proof-of-Concept
- Impact: Arbitrary Code Execution
- Patch Status: Fixed in v2026.2.14
Affected Systems
- OpenClaw Agent Hosts
- OpenClaw CLI environments
- CI/CD pipelines using OpenClaw
-
openclaw/openclaw: < 2026.2.14 (Fixed in:
2026.2.14)
Code Analysis
Commit: 013e8f6
fix(security): prevent path hijacking and unsafe env overrides
SANITIZED_DIFF_CONTENT
Exploit Details
- GitHub Advisory: Advisory containing PoC logic
Mitigation Strategies
- Upgrade to OpenClaw v2026.2.14 immediately.
- Disable
OPENCLAW_ALLOW_PROJECT_LOCAL_BINunless strictly necessary. - Restrict write permissions on directories where OpenClaw is executed.
Remediation Steps:
- Run
npm install openclaw@latestoryarn upgrade openclaw. - Verify the version with
openclaw --version. - Check your configuration files for any unsafe environment variable overrides.
References
Read the full report for GHSA-JQPQ-MGVM-F9R6 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)