DEV Community

CVE Reports
CVE Reports

Posted on • Originally published at cvereports.com

GHSA-JQPQ-MGVM-F9R6: OpenClaw: The "Helpful" Path to Remote Code Execution

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
Enter fullscreen mode Exit fullscreen mode

Exploit Details

Mitigation Strategies

  • Upgrade to OpenClaw v2026.2.14 immediately.
  • Disable OPENCLAW_ALLOW_PROJECT_LOCAL_BIN unless strictly necessary.
  • Restrict write permissions on directories where OpenClaw is executed.

Remediation Steps:

  1. Run npm install openclaw@latest or yarn upgrade openclaw.
  2. Verify the version with openclaw --version.
  3. 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)