Openclaw cli: OpenClaw: Skill env override host env injection via applySkillConfigEnvOverrides (defense-in-depth) (CVE-2026-4039)
Description
The OpenClaw CLI had a vulnerability in the applySkillConfigEnvOverrides function where environment variables from skill configurations were copied into the host process environment without proper safety checks. This allowed injection of dangerous process-level variables like NODE_OPTIONS, potentially affecting runtime and child process behavior. The vulnerability requires an attacker to have the ability to modify local OpenClaw configuration files. A fix was released in version 2026.2.21 that sanitizes these environment overrides and blocks dangerous keys.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in OpenClaw CLI (CVE-2026-4039) involves the applySkillConfigEnvOverrides function copying environment variables from skill entries into the host process environment without enforcing the host environment safety policy. This allowed injection of dangerous variables such as NODE_OPTIONS, which can influence runtime and child process behavior. Exploitation requires the attacker to modify local OpenClaw configuration state (e.g., ~/.openclaw/openclaw.json). The issue was fixed in version 2026.2.21 by sanitizing the skill environment overrides and blocking dangerous host environment keys before applying them. Regression tests were added to prevent recurrence.
Potential Impact
An attacker with the ability to modify local OpenClaw configuration files can inject dangerous environment variables like NODE_OPTIONS into the host process environment. This can influence the runtime behavior and child processes, potentially leading to unintended or malicious behavior at the process level. No remote or unauthenticated exploitation is indicated.
Mitigation Recommendations
A fix is available in OpenClaw CLI version 2026.2.21 that sanitizes skill environment overrides and blocks dangerous host environment keys including NODE_OPTIONS. Users should upgrade to version 2026.2.21 or later to remediate this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-4039
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac245a812601ec6a31661b4
Added to database: 10/04/2026, 12:25:12 UTC
Last enriched: 10/04/2026, 12:52:14 UTC
Last updated: 10/04/2026, 16:08:39 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.