CVE-2026-4039: OpenClaw Skill Env Override Host Env Vulnerability

MODERATE
Advisory Identifier: GHSA-82g8-464f-2mv7
CWE-15 CWE-94 CWE-1341
Published
Advisory Summary

CVE-2026-4039 is a MODERATE skill env override host env vulnerability (CWE-15: External Control of System or Configuration Setting) affecting OpenClaw libraries in the npm ecosystem. The issue involves skill env override host env injection via applyskillconfigenvoverrides (defense-in-depth). Remediation is available by upgrading affected packages to version 2026.2.21.

CVE-2026-4039 at a Glance

CVE Identifier CVE-2026-4039
GHSA Identifier GHSA-82g8-464f-2mv7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-15: External Control of System or Configuration Setting
Affected Product OpenClaw
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-4039

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.21
npm install openclaw@2026.2.21
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-4039, 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.21), 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 `applySkillConfigEnvOverrides` previously copied `skills.entries.*.env` values into the host `process.env` without applying the host env safety policy. ### Impact In affected versions, dangerous process-level variables such as `NODE_OPTIONS` could be injected when unset, which can influence runtime/child-process behavior. ### Required attacker capability An attacker must be able to modify OpenClaw local state/config (for example `~/.openclaw/openclaw.json`) to set `skills.entries.<skill>.env` or related skill config values. ### Remediation Fixed in `2026.2.21` by sanitizing skill env overrides and blocking dangerous host env keys (including `NODE_OPTIONS`) before applying overrides, with regression tests covering blocked dangerous keys. ## Fix Commit(s) - `8c9f35cdb51692b650ddf05b259ccdd75cc9a83c` Found using [MCPwner](https://github.com/Pigyon/MCPwner)

CVE-2026-4039 Affected OpenClaw Versions

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

References

Frequently Asked Questions

What is CVE-2026-4039?
CVE-2026-4039 is a security vulnerability in OpenClaw involving Skill env override host env injection via applySkillConfigEnvOverrides (defense-in-depth) under CWE-15: External Control of System or Configuration Setting.
Which OpenClaw versions are affected?
Affected versions include releases prior to 2026.2.21 across affected packages: openclaw.
What version fixes CVE-2026-4039?
Upgrading to 2026.2.21 (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.21. Upgrade your dependency to 2026.2.21 or later.
What CWE is associated with CVE-2026-4039?
CVE-2026-4039 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 CVE-2026-4039?
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-82g8-464f-2mv7",
  "modified" : "2026-03-12T17:30:21Z",
  "published" : "2026-02-27T21:36:17Z",
  "aliases" : [ "CVE-2026-4039" ],
  "summary" : "OpenClaw: Skill env override host env injection via applySkillConfigEnvOverrides (defense-in-depth)",
  "details" : "### Summary\n`applySkillConfigEnvOverrides` previously copied `skills.entries.*.env` values into the host `process.env` without applying the host env safety policy.\n\n### Impact\nIn affected versions, dangerous process-level variables such as `NODE_OPTIONS` could be injected when unset, which can influence runtime/child-process behavior.\n\n### Required attacker capability\nAn attacker must be able to modify OpenClaw local state/config (for example `~/.openclaw/openclaw.json`) to set `skills.entries.<skill>.env` or related skill config values.\n\n### Remediation\nFixed in `2026.2.21` by sanitizing skill env overrides and blocking dangerous host env keys (including `NODE_OPTIONS`) before applying overrides, with regression tests covering blocked dangerous keys.\n\n## Fix Commit(s)\n- `8c9f35cdb51692b650ddf05b259ccdd75cc9a83c`\n\nFound using [MCPwner](https://github.com/Pigyon/MCPwner)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "openclaw"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2026.2.21"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/security/advisories/GHSA-82g8-464f-2mv7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-4039"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/commit/8c9f35cdb51692b650ddf05b259ccdd75cc9a83c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/openclaw/openclaw"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/openclaw/openclaw/releases/tag/v2026.2.21"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1341", "CWE-15", "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-27T21:36:17Z",
    "nvd_published_at" : null
  }
}