GHSA-5h2c-8v84-qpvr: Openclaw OpenClaw Shell-env Fallback Trusted Startup Vulnerability

MODERATE
CVSS 5.3
CWE-15 CWE-78
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-5h2c-8v84-qpvr
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-15: External Control of System or Configuration Setting
Affected Product Openclaw
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

openclaw fixed: 2026.2.22
npm install openclaw@2026.2.22
Verify Direct and Transitive Dependencies

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

### Summary OpenClaw shell-env fallback trusted startup environment values and could execute attacker-influenced login-shell startup paths before loading env keys. ### Affected Packages / Versions - Package: `openclaw` (npm) - Affected versions: `>= 2026.1.5` and `<= 2026.2.21-2` - Fixed on `main`: `9363c320d8ffe29290906752fab92621da02c3f7` - Planned patched release version (pre-set): `2026.2.22` ### Details The vulnerable chain was in the shell-env fallback path: 1. `src/infra/shell-env.ts` - `resolveShell(env)` trusted `env.SHELL` when set. - `execLoginShellEnvZero(...)` executed `${SHELL} -l -c "env -0"` with inherited runtime env. 2. `src/config/io.ts` - Config env values were applied before shell fallback execution. 3. `src/config/env-vars.ts` / env policy coverage - `SHELL` handling was hardened, but startup-path selectors (`HOME`, `ZDOTDIR`) still needed explicit blocking in config env ingestion and sanitization for shell fallback execution. With env/config influence, this could trigger unintended command execution in shell startup processing on the OpenClaw host process context. ### Fix Mainline hardening now: - blocks `SHELL`, `HOME`, and `ZDOTDIR` during config env ingestion used by runtime fallback, - sanitizes shell fallback execution env, pinning `HOME` to the real user home and dropping `ZDOTDIR` + dangerous startup vars, - adds regression tests for config env ingestion and shell fallback/path-probe sanitization. ### Fix Commit(s) - `9363c320d8ffe29290906752fab92621da02c3f7` ### Impact - Local code-execution risk in environments where attacker-controlled env/config input can reach shell-env fallback. - Under OpenClaw trust assumptions (`SECURITY.md`), this is not a public-remote issue and depends on crossing local trusted-operator boundaries. ### Release Process Note `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. OpenClaw thanks @tdjackey for reporting.

GHSA-5h2c-8v84-qpvr Affected Openclaw Versions

1 component(s)
Fixed Versions:
2026.2.22
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?
GHSA-5h2c-8v84-qpvr is a security vulnerability in Openclaw involving OpenClaw shell-env fallback trusted startup env and could execute attacker-influenced login-shell paths under CWE-15: External Control of System or Configuration Setting.
Which Openclaw versions are affected?
Affected versions include releases prior to 2026.2.22 across affected packages: openclaw.
What version fixes GHSA-5h2c-8v84-qpvr?
Upgrading to 2026.2.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openclaw affected?
Yes, openclaw is affected in releases prior to 2026.2.22. Upgrade your dependency to 2026.2.22 or later.
What is the CVSS score of GHSA-5h2c-8v84-qpvr?
GHSA-5h2c-8v84-qpvr has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with GHSA-5h2c-8v84-qpvr?
GHSA-5h2c-8v84-qpvr is classified under CWE-15: External Control of System or Configuration Setting (One or more system settings or configuration elements can be externally controlled by a user.).
How can I check npm dependencies for GHSA-5h2c-8v84-qpvr?
Run the dependency tree command: 'npm ls openclaw'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}