OpenClaw Arbitrary Code Execution Vulnerability via .npmrc in Local Plugin and Hook Installation

Vulnerability

A vulnerability allowing arbitrary code execution has been identified in OpenClaw versions prior to 2026.3.24. This issue arises during the installation of local plugins and hooks, where an attacker can execute malicious code by creating a .npmrc file that overrides the git executable. When npm install is executed in the staged package directory, the attacker can use git dependencies to run arbitrary programs specified in the .npmrc file.

Impact

Exploitation of this vulnerability allows for arbitrary code execution on the local machine during the installation of plugins or hooks.

Reproduction

To reproduce this vulnerability, create a local plugin or hook package that includes a .npmrc file. In the .npmrc file, set the git configuration to point to a malicious executable, such as calc.exe. Then, include a git dependency in the package.json file of the plugin or hook. When the package is installed using OpenClaw, the npm installer will read the .npmrc file, override the git executable path, and execute the specified program if a git dependency is present.

Remediation

Users should update to OpenClaw version 2026.3.24 or later, where this vulnerability has been patched.

Added: Apr 10, 2026, 6:39 PM
Updated: Apr 10, 2026, 6:39 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
5.6
remediation
0.0
relevance
5.6
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.