{"id":"GHSA-w9cg-v44m-4qv8","summary":"OpenClaw affected by BASH_ENV / ENV startup-file injection into spawned shell commands","details":"### Summary\n`BASH_ENV` / `ENV` startup-file injection could lead to unintended pre-command shell execution when attacker-controlled environment values were admitted and then inherited by host command execution paths.\n\n### Affected Packages / Versions\n- Package: `openclaw` (npm)\n- Affected: `\u003c= 2026.2.19-2`\n- Fixed on `main`: `2cdbadee1f8fcaa93302d7debbfc529e19868ea4`\n- Planned patched release version: `2026.2.21`\n\n### Details\nThe fix hardens environment handling across all relevant execution paths:\n- Blocks dangerous startup/runtime env keys and prefixes in shared host env sanitization.\n- Sanitizes inherited ambient environment even when no per-request overrides are provided.\n- Blocks dangerous config-driven env injection before values enter process environment.\n- Uses the same sanitizer in macOS host execution paths.\n- Aligns skill env override sanitization with the shared dangerous-env policy.\n\n### Impact\nMedium. Exploitation requires local/privileged influence over configuration or environment inputs; there is no standalone remote unauthenticated trigger from this issue alone.\n\n### Fix Commit(s)\n- `2cdbadee1f8fcaa93302d7debbfc529e19868ea4`\n\n### Release Process Note\n`patched_versions` is pre-set to the planned next release (`2026.2.21`). Once npm `openclaw@2026.2.21` is published, the advisory can be published without further field edits.\n\nOpenClaw thanks @tdjackey for reporting.","modified":"2026-03-04T15:17:45.364771Z","published":"2026-03-03T22:09:52Z","database_specific":{"nvd_published_at":null,"cwe_ids":["CWE-15","CWE-78"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-03-03T22:09:52Z"},"references":[{"type":"WEB","url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-w9cg-v44m-4qv8"},{"type":"WEB","url":"https://github.com/openclaw/openclaw/commit/2cdbadee1f8fcaa93302d7debbfc529e19868ea4"},{"type":"PACKAGE","url":"https://github.com/openclaw/openclaw"}],"affected":[{"package":{"name":"openclaw","ecosystem":"npm","purl":"pkg:npm/openclaw"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2026.2.21"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-w9cg-v44m-4qv8/GHSA-w9cg-v44m-4qv8.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}