Details
Who is impacted
Users who run:
openclaw plugins install <local path/archive>
openclaw hooks install <local path/archive>
And who install a malicious or untrusted local package that includes:
a controlled .npmrc
a git dependency
a runnable attacker-controlled git target on that platform
This should be treated as a security issue, not just “malicious plugin behavior,” because the code execution happens during OpenClaw’s install workflow, before the plugin or hook is ever loaded as trusted runtime code.
The important distinction is:
A normal “trusted plugin” case is: the operator installs a plugin, enables it, and later that plugin runs with plugin privileges.
This issue is different: OpenClaw’s installer executes npm install --omit=dev --silent --ignore-scripts inside an attacker-controlled package directory, and npm still honors attacker-controlled project config from .npmrc.
That means an untrusted local plugin or hook package can influence the package manager itself and reach arbitrary program execution at install time, via npm’s git setting and a git dependency, even though --ignore-scripts is present.
Why this matters from a security perspective:
It is install-time execution, not post-install trusted execution.
The execution is triggered by OpenClaw’s installer in src/infra/install-package-dir.ts:188-199.
This occurs before the package is accepted as a trusted loaded plugin/hook in the usual sense.
It defeats an expected safety boundary.
The code explicitly uses --ignore-scripts, which strongly suggests an intent to make installation safer.
But the installer still allows attacker-controlled package-manager configuration from .npmrc to affect execution.
So the current mitigation is incomplete in a security-relevant way.
The dangerous input is part of a supported user flow.
OpenClaw explicitly supports installing plugins and hook packs from local directories and archives:
src/cli/plugins-cli.ts:199-255
src/cli/hooks-cli.ts:573-676
That makes “download a package/archive, then install it” a realistic operator action, not an artificial lab setup.
The issue is broader than plugin trust.
The problem is not “plugins can do bad things once trusted.”
The problem is “the installer consumes attacker-controlled package-manager config before trust is established.”
That is much closer to an unsafe install / supply-chain execution flaw than to ordinary trusted-plugin behavior.
Hooks are affected too.
The same installer path is used for hook packs, not only plugins.
So this is a shared install-surface issue, not an isolated plugin-runtime concern.