# GHSA-j425-whc4-4jgc: OpenClaw's \`system.run\` env override filtering allowed dangerous helper-command pivots

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **CWE:** CWE-15, CWE-639
- **Published:** 2026-03-09T19:52:59.000Z
- **Modified:** 2026-03-09T20:01:15.390Z

## Who should check

- Projects that depend on npm package openclaw (\< 2026.3.7)

## Description

\#\#\# Summary
\`system.run\` env override sanitization allowed dangerous override-only helper-command pivots to reach subprocesses. A caller who could invoke \`system.run\` with \`env\` overrides could bypass allowlist/approval intent by steering an allowlisted tool through helper-command or config-loading environment variables such as \`GIT\_SSH\_COMMAND\`, editor/pager hooks, and \`GIT\_CONFIG\_\*\` / \`NPM\_CONFIG\_\*\`.

\#\#\# Affected Packages / Versions
- Package: \`openclaw\` (npm)
- Latest published vulnerable version: \`2026.3.2\`
- Affected range: \`\<= 2026.3.2\`
- Patched in: \`2026.3.7\`

\#\#\# Details
Before the fix, \`src/infra/host-env-security.ts\` blocked only a narrow set of override-only environment variables. Dangerous request-scoped overrides such as \`GIT\_SSH\_COMMAND\` and prefix families such as \`GIT\_CONFIG\_\*\` and \`NPM\_CONFIG\_\*\` could still survive \`sanitizeSystemRunEnvOverrides(...)\` / \`sanitizeHostExecEnv(...)\` and reach the spawned process.

That mattered for \`system.run\` allowlist and approval flows because approval evaluation was tied to the reviewed binary/argv, while the launched process could still inherit attacker-controlled env overrides that changed helper-command execution or config resolution. For allowlisted tools such as \`git\`, this allowed behavior outside the reviewed command semantics.

The fix extends the shared TypeScript and macOS policy to block dangerous override-only exact keys and prefixes while preserving trusted inherited base-environment behavior.

\#\#\# Impact
This is a real protection-bypass issue, but exploitation requires an already tool-enabled caller who can invoke \`system.run\` and supply \`env\` overrides. In affected deployments, that caller could bypass allowlist/approval intent and trigger helper-command execution or config-loading behavior that is not represented by the approved command line. Maintainer severity is set to medium because the bug still requires that existing execution capability; the vulnerability is the mismatch between reviewed command semantics and the actual spawned-process behavior.

\#\#\# Fix Commit(s)
- \`e27bbe4982439da6864160fd1b66445058f74801\`

\#\#\# Release Process Note
npm \`2026.3.7\` was published on March 8, 2026. This advisory is fixed in the released package.

Thanks @tdjackey and @SnailSploit for reporting.

## Affected and fixed versions

- npm `openclaw`: affected \< 2026.3.7; fixed 2026.3.7 (osv)

## Mitigation

- Upgrade openclaw to 2026.3.7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by GHSA-j425-whc4-4jgc. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/GHSA-j425-whc4-4jgc.md
Affected: openclaw < 2026.3.7
Fixed in: 2026.3.7

Steps:
1. Search this machine and project for openclaw (npm): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is GHSA-j425-whc4-4jgc being exploited?

There is no confirmed exploitation: GHSA-j425-whc4-4jgc is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is GHSA-j425-whc4-4jgc?

It has no CVSS score yet. Unknown.

### Which versions are affected by GHSA-j425-whc4-4jgc?

openclaw \< 2026.3.7.

### Is there a fix for GHSA-j425-whc4-4jgc?

Yes. Fixed in 2026.3.7. Upgrade openclaw to 2026.3.7 or later.

### How do I check if I'm affected by GHSA-j425-whc4-4jgc?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/openclaw/openclaw/security/advisories/GHSA-j425-whc4-4jgc>
- patch: <https://github.com/openclaw/openclaw/commit/e27bbe4982439da6864160fd1b66445058f74801>
- other: <https://github.com/openclaw/openclaw>
- other: <https://github.com/openclaw/openclaw/releases/tag/v2026.3.7>

## Attribution

- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-j425-whc4-4jgc> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/GHSA-j425-whc4-4jgc> · JSON: <https://flawdb.com/api/v1/entries/GHSA-j425-whc4-4jgc>
