CVE-2026-32015: OpenClaw's `tools.exec.safeBins` PATH-hijack allowed trojan binaries to bypass allowlist checks
OpenClaw 2026.1.21 up to 2026.2.18 validated `tools.exec.safeBins` entries by executable name and argument shape without checking where the binary lived. A trojan `jq` reached through a hijacked PATH ran as an allowlisted tool. Upgrade to openclaw 2026.2.19.
Published Mar 3, 2026 · Updated Mar 30, 2026 · Analysis Oct 31, 2026
What an attacker can do
In allowlist mode, safeBins approves tools such as jq when the command matches the name and an allowed argument shape. Before the fix, the resolved path of that executable was not required to sit in a trusted directory. If an attacker could shape PATH resolution before the gateway started, or otherwise control its launch environment, a binary named jq of their choosing would pass the check and run with the gateway's rights.
This needs a second foothold, which is why the maintainers rate it medium. Request-scoped PATH injection is blocked for host execution, so the attacker cannot set PATH through a normal tool request. Realistic paths are a poisoned PATH entry in a service unit, shell profile or container image, or a writable directory earlier in PATH.
The outcome is command execution as the OpenClaw user, running under the name of an approved tool, so the allowlist offers no protection against it. The CVSS vectors are local with low privileges.
Who is affected
openclaw (npm) versions from 2026.1.21 up to but not including 2026.2.19 are affected in the package data. The advisory text gives the range as >= 2026.1.21 < 2026.2.18, with 2026.2.17 the latest published at triage, so treat anything below 2026.2.19 as vulnerable. Only allowlist mode with tools.exec.safeBins is relevant.
npm ls openclaw
echo $PATHInspect each PATH directory for write access by untrusted users.
openclaw
- Ecosystem
- npm
- Affected
- >= 2026.1.21, < 2026.2.19
- Fixed in
- 2026.2.19
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.19:
npm install [email protected]The fix requires the resolved executable path of a safe bin to be in a trusted directory. That set is the built-in system defaults plus the entries of the gateway's startup PATH. No new config key is added. Because the gateway startup PATH is trusted, make sure it contains no user-writable directories.
How to tell if you were hit
Compare the real path of safe-bin tools such as jq on the gateway host with the package-manager copy, and look for a jq earlier in PATH than the system one. Check the gateway's service definition and environment for odd PATH entries such as /tmp paths. Beam records agent shell commands, so you can see which binaries an agent ran.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
tools.exec.safeBins allowlist checks could be bypassed by PATH-hijacked binaries, allowing execution of attacker-controlled trojan binaries under an allowlisted executable name.
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published version at triage time:
2026.2.17 - Affected range:
>= 2026.1.21 < 2026.2.18 - Patched version:
2026.2.19
Impact
In allowlist mode, safeBins validation previously accepted a resolved executable path based on executable name and argument shape, without enforcing trusted executable directories. If an attacker could influence process PATH resolution before gateway startup (or otherwise control the gateway launch environment), a trojan binary with an allowlisted name (for example jq) could be executed.
Severity Rationale
This issue is rated medium because exploitation requires an additional precondition: influencing the gateway process PATH / launch environment. Request-scoped PATH injection is blocked for host execution.
Fix
safeBins now requires the resolved executable path to come from trusted bin directories (system defaults plus gateway startup PATH), closing the bypass.
Fix Commit(s)
- 28bac46c92069dc728524fbf383024c1b64e5c23
OpenClaw thanks @jackhax for reporting.
Credited to jackhax.
Questions
- Can an agent request set PATH to exploit CVE-2026-32015?
No. The advisory says request-scoped PATH injection is blocked for host execution. The attacker must influence PATH before gateway startup or control the launch environment.
- Why do the advisory text and package data show different ranges?
The text says
>= 2026.1.21 < 2026.2.18, while the package data says below 2026.2.19. The patched version is 2026.2.19 in both, so upgrade to that.- Does the fix add a setting?
No. The commit adds no config key.
tools.exec.safeBinsnow requires a binary from a trusted directory.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
