tools.exec.safeBins allowlist checks could be bypassed by PATH-hijacked binaries, allowing execution of attacker-controlled trojan binaries under an allowlisted executable name.
openclaw (npm)2026.2.17>= 2026.1.21 < 2026.2.182026.2.19In 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.
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.
safeBins now requires the resolved executable path to come from trusted bin directories (system defaults plus gateway startup PATH), closing the bypass.
OpenClaw thanks @jackhax for reporting.
{
"github_reviewed": true,
"github_reviewed_at": "2026-03-03T22:08:26Z",
"severity": "HIGH",
"nvd_published_at": "2026-03-19T22:16:34Z",
"cwe_ids": [
"CWE-426",
"CWE-863"
]
}