CVE-2026-41387: Openclaw OpenClaw's Incomplete Host Env Sanitization Vulnerability

HIGH
Advisory Identifier: GHSA-j7p2-qcwm-94v4
CVSS 9.6
CWE-183
Published
Advisory Summary

CVE-2026-41387 is a HIGH (CVSS 9.6) openclaw's incomplete host env sanitization vulnerability (CWE-183: Permissive List of Allowed Inputs) affecting Openclaw libraries in the npm ecosystem. The issue involves openclaw's incomplete host env sanitization blocklist allows supply-chain redirection via package-manager env overrides. Remediation is available by upgrading affected packages to version 2026.3.22.

CVE-2026-41387 at a Glance

CVE Identifier CVE-2026-41387
GHSA Identifier GHSA-j7p2-qcwm-94v4
Severity HIGH
CVSS v3.1 Base Score 9.6
CWE Classification CWE-183: Permissive List of Allowed Inputs
Affected Product Openclaw
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-41387

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.3.22
npm install openclaw@2026.3.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 CVE-2026-41387, 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.3.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-183: Permissive List of Allowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses. 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 Host exec env override sanitization did not fail closed for several package-manager and related redirect variables that can steer dependency fetches or startup behavior. ## Impact An approved exec request could silently redirect package resolution or runtime bootstrap to attacker-controlled infrastructure and execute trojanized content. ## Affected Component `src/infra/host-env-security-policy.json, src/infra/host-env-security.ts` ## Fixed Versions - Affected: `< 2026.3.22` - Patched: `>= 2026.3.22` ## Fix Fixed by commit `7abfff756d` (`Exec: harden host env override handling across gateway and node`).

CVE-2026-41387 Affected Openclaw Versions

1 component(s)
Fixed Versions:
2026.3.22
Product / Package Ecosystem Affected Versions Fixed Version
openclaw
npm
< 2026.3.22
2026.3.22

References

Frequently Asked Questions

What is CVE-2026-41387?
CVE-2026-41387 is a security vulnerability in Openclaw involving OpenClaw's incomplete host env sanitization blocklist allows supply-chain redirection via package-manager env overrides under CWE-183: Permissive List of Allowed Inputs.
Which Openclaw versions are affected?
Affected versions include releases prior to 2026.3.22 across affected packages: openclaw.
What version fixes CVE-2026-41387?
Upgrading to 2026.3.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.3.22. Upgrade your dependency to 2026.3.22 or later.
What is the CVSS score of CVE-2026-41387?
CVE-2026-41387 has a CVSS v3.1 base score of 9.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-41387?
CVE-2026-41387 is classified under CWE-183: Permissive List of Allowed Inputs (The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.).
How can I check npm dependencies for CVE-2026-41387?
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-j7p2-qcwm-94v4",
  "modified" : "2026-05-06T02:36:21Z",
  "published" : "2026-03-31T23:59:36Z",
  "aliases" : [ "CVE-2026-41387" ],
  "summary" : "OpenClaw's incomplete host env sanitization blocklist allows supply-chain redirection via package-manager env overrides",
  "details" : "## Summary\n\nHost exec env override sanitization did not fail closed for several package-manager and related redirect variables that can steer dependency fetches or startup behavior.\n\n## Impact\n\nAn approved exec request could silently redirect package resolution or runtime bootstrap to attacker-controlled infrastructure and execute trojanized content.\n\n## Affected Component\n\n`src/infra/host-env-security-policy.json, src/infra/host-env-security.ts`\n\n## Fixed Versions\n\n- Affected: `< 2026.3.22`\n- Patched: `>= 2026.3.22`\n\n## Fix\n\nFixed by commit `7abfff756d` (`Exec: harden host env override handling across gateway and node`).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.3.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-j7p2-qcwm-94v4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41387"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/7abfff756d6c68d17e21d1657bbacbaec86de232"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/releases/tag/v2026.3.22"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/openclaw-supply-chain-redirection-via-incomplete-host-environment-sanitization"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-183" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-31T23:59:36Z",
    "nvd_published_at" : "2026-04-28T19:37:41Z"
  }
}