{"answers":{"affected":"2 open source packages ship an affected version, including openclaw.","exploited":"There is no known exploitation of GHSA-5h2c-8v84-qpvr in the wild and no public exploit code.","fix":"Upgrade openclaw to 2026.2.22 or later.","what":"GHSA-5h2c-8v84-qpvr is a command injection vulnerability in openclaw, published on 3 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-5h2c-8v84-qpvr and fix it if it is affected.\n\nWhat it is: GHSA-5h2c-8v84-qpvr is a command injection vulnerability in openclaw, published on 3 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-5h2c-8v84-qpvr in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- openclaw (npm): affected all versions; fixed in 2026.2.22\n- openclaw (npm): affected all versions; fixed in 2026.2.22\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-5h2c-8v84-qpvr/ (Markdown: https://insights.sbomify.com/GHSA-5h2c-8v84-qpvr/index.md)","id":"GHSA-5h2c-8v84-qpvr","markdown":"https://insights.sbomify.com/GHSA-5h2c-8v84-qpvr/index.md","name":"GHSA-5h2c-8v84-qpvr","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Node.js shell-env library","requires_auth":"none","summary":"Attacker with local environment or config influence can execute arbitrary commands via shell-env fallback in OpenClaw.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nOpenClaw shell-env fallback trusted startup environment values and could execute attacker-influenced login-shell startup paths before loading env keys.\n\n### Affected Packages / Versions\n- Package: `openclaw` (npm)\n- Affected versions: `\u003e= 2026.1.5` and `\u003c= 2026.2.21-2`\n- Fixed on `main`: `9363c320d8ffe29290906752fab92621da02c3f7`\n- Planned patched release version (pre-set): `2026.2.22`\n\n### Details\nThe vulnerable chain was in the shell-env fallback path:\n\n1. `src/infra/shell-env.ts`\n- `resolveShell(env)` trusted `env.SHELL` when set.\n- `execLoginShellEnvZero(...)` executed `${SHELL} -l -c \"env -0\"` with inherited runtime env.\n\n2. `src/config/io.ts`\n- Config env values were applied before shell fallback execution.\n\n3. `src/config/env-vars.ts` / env policy coverage\n- `SHELL` handling was hardened, but startup-path selectors (`HOME`, `ZDOTDIR`) still needed explicit blocking in config env ingestion and sanitization for shell fallback execution.\n\nWith env/config influence, this could trigger unintended command execution in shell startup processing on the OpenClaw host process context.\n\n### Fix\nMainline hardening now:\n- blocks `SHELL`, `HOME`, and `ZDOTDIR` during config env ingestion used by runtime fallback,\n- sanitizes shell fallback execution env, pinning `HOME` to the real user home and dropping `ZDOTDIR` + dangerous startup vars,\n- adds regression tests for config env ingestion and shell fallback/path-probe sanitization.\n\n### Fix Commit(s)\n- `9363c320d8ffe29290906752fab92621da02c3f7`\n\n### Impact\n- Local code-execution risk in environments where attacker-controlled env/config input can reach shell-env fallback.\n- Under OpenClaw trust assumptions (`SECURITY.md`), this is not a public-remote issue and depends on crossing local trusted-operator boundaries.\n\n### Release Process Note\n`patched_versions` is intentionally pre-set to the planned next release (`2026.2.22`) so once npm release is out, maintainers can publish advisory immediately.\n\nOpenClaw thanks @tdjackey for reporting.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"OpenClaw shell-env fallback trusted startup env and could execute attacker-influenced login-shell paths","id":"GHSA-5h2c-8v84-qpvr","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2026.2.22"],"introduced":["0"],"last_affected":[],"package":"openclaw","purl":null,"source":"GHSA-5h2c-8v84-qpvr"},{"ecosystem":"npm","fixed":["2026.2.22"],"introduced":["0"],"last_affected":[],"package":"openclaw","purl":"pkg:npm/openclaw","source":"GHSA-5h2c-8v84-qpvr"}],"products":null,"published":"2026-03-03","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attacker with local environment or config influence can execute arbitrary commands via shell-env fallback in OpenClaw.","url":"https://insights.sbomify.com/GHSA-5h2c-8v84-qpvr/"}