# GHSA-qhrr-grqp-6x2g: OpenClaw's tools.exec.safeBins trusted PATH directories allowed binary shadowing in allowlist mode

> Attackers can bypass exec allowlists in OpenClaw by shadowing safe binaries in trusted PATH directories, leading to arbitrary command execution.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2026

## What is GHSA-qhrr-grqp-6x2g?

GHSA-qhrr-grqp-6x2g is a vulnerability in openclaw, published on 3 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary
In `openclaw` allowlist mode, `tools.exec.safeBins` trusted PATH-derived directories for safe-bin resolution. A same-name binary placed in a trusted PATH directory could satisfy safe-bin checks and execute.

### Impact
This is an allowlist bypass in exec policy that can lead to command execution in the OpenClaw runtime context when allowlist mode relies on safe bins and an attacker can influence trusted binary locations.

### Affected Packages / Versions
- Package: `openclaw` (npm)
- Vulnerable versions: `<= 2026.2.21-2`
- Patched versions: `>= 2026.2.22` (planned next release)
- Latest published npm version at triage time (2026-02-22): `2026.2.21-2`

### Root Cause
- Safe-bin trust accepted PATH-derived directories instead of explicit trusted directories.
- Safe-bin execution used shell command tokens that could resolve to shadowed binaries.

### Remediation
- Stop trusting PATH-derived directories for safe-bin trust.
- Add explicit `tools.exec.safeBinTrustedDirs` for opt-in extra trusted paths.
- Pin safe-bin shell execution to resolved absolute executable paths.

### Fix Commit(s)
- `64b273a71cf0b2f2419c974832cede1fc2158729`

### Release Process Note
`patched_versions` is pre-set to the planned next release (`2026.2.22`). After npm release, this advisory is ready for publish without additional field edits.

OpenClaw thanks @tdjackey for reporting.

## Which versions are affected by GHSA-qhrr-grqp-6x2g?

2 open source packages ship an affected version, including openclaw.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openclaw` | npm | All versions | 2026.2.22 |
| `openclaw` | npm | All versions | 2026.2.22 |

## How do I fix GHSA-qhrr-grqp-6x2g?

Upgrade openclaw to 2026.2.22 or later.

## Is GHSA-qhrr-grqp-6x2g being exploited?

There is no known exploitation of GHSA-qhrr-grqp-6x2g in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-qhrr-grqp-6x2g and fix it if it is affected.

What it is: GHSA-qhrr-grqp-6x2g is a vulnerability in openclaw, published on 3 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-qhrr-grqp-6x2g in the wild and no public exploit code.

Affected packages and fixed versions:
- openclaw (npm): affected all versions; fixed in 2026.2.22
- openclaw (npm): affected all versions; fixed in 2026.2.22

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-qhrr-grqp-6x2g/ (Markdown: https://insights.sbomify.com/GHSA-qhrr-grqp-6x2g/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-qhrr-grqp-6x2g

---
From sbomify Insights: https://insights.sbomify.com/GHSA-qhrr-grqp-6x2g/
Summaries are generated and may contain mistakes; the official description above is the record.
