GHSA-5h2c-8v84-qpvr: Openclaw OpenClaw Shell-env Fallback Trusted Startup Vulnerability
MODERATEGHSA-5h2c-8v84-qpvr is a MODERATE (CVSS 5.3) openclaw shell-env fallback trusted startup vulnerability (CWE-15: External Control of System or Configuration Setting) affecting Openclaw libraries in the npm ecosystem. The issue involves openclaw shell-env fallback trusted startup env and could execute attacker-influenced login-shell paths. Remediation is available by upgrading affected packages to version 2026.2.22.
GHSA-5h2c-8v84-qpvr at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix GHSA-5h2c-8v84-qpvr
To remediate this vulnerability, upgrade all affected Openclaw dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install openclaw@2026.2.22
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls openclaw
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-5h2c-8v84-qpvr, inspect your project dependencies using npm:
npm ls openclaw
Analyze the terminal output to locate any version of Openclaw in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2026.2.22), your application is affected.
Note: The npm ls openclaw command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-15: External Control of System or Configuration Setting, where one or more system settings or configuration elements can be externally controlled by a user. In Openclaw, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5h2c-8v84-qpvr Affected Openclaw Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openclaw
|
npm |
< 2026.2.22
|
2026.2.22
|
References
Frequently Asked Questions
What is GHSA-5h2c-8v84-qpvr?
Which Openclaw versions are affected?
What version fixes GHSA-5h2c-8v84-qpvr?
Is openclaw affected?
What is the CVSS score of GHSA-5h2c-8v84-qpvr?
What CWE is associated with GHSA-5h2c-8v84-qpvr?
How can I check npm dependencies for GHSA-5h2c-8v84-qpvr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5h2c-8v84-qpvr",
"modified" : "2026-03-03T21:39:51Z",
"published" : "2026-03-03T21:39:51Z",
"aliases" : [ ],
"summary" : "OpenClaw shell-env fallback trusted startup env and could execute attacker-influenced login-shell paths",
"details" : "### 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: `>= 2026.1.5` and `<= 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "openclaw"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2026.2.22"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-5h2c-8v84-qpvr"
}, {
"type" : "WEB",
"url" : "https://github.com/openclaw/openclaw/commit/9363c320d8ffe29290906752fab92621da02c3f7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openclaw/openclaw"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-15", "CWE-78" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-03T21:39:51Z",
"nvd_published_at" : null
}
}