CVE-2026-4039: OpenClaw Skill Env Override Host Env Vulnerability
MODERATECVE-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
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.
npm install openclaw@2026.2.21
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
CVE-2026-4039 Affected OpenClaw Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
openclaw
|
npm |
< 2026.2.21
|
2026.2.21
|
References
Frequently Asked Questions
What is CVE-2026-4039?
Which OpenClaw versions are affected?
What version fixes CVE-2026-4039?
Is openclaw affected?
What CWE is associated with CVE-2026-4039?
How can I check npm dependencies for CVE-2026-4039?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}