CVE-2026-4039

CVE-2026-4039 is a medium-severity code injection vulnerability in openclaw (npm), affecting versions < 2026.2.21. It is fixed in 2026.2.21.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

OpenClaw: Skill env override host env injection via applySkillConfigEnvOverrides (defense-in-depth)

applySkillConfigEnvOverrides previously copied skills.entries.*.env values into the host process.env without applying the host env safety policy.

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.

Fix Commit(s)

  • 8c9f35cdb51692b650ddf05b259ccdd75cc9a83c

Found using MCPwner

Impact

In affected versions, dangerous process-level variables such as NODE_OPTIONS could be injected when unset, which can influence runtime/child-process behavior.

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

Affected versions

openclaw (< 2026.2.21)

Security releases

openclaw → 2026.2.21 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-4039? CVE-2026-4039 is a medium-severity code injection vulnerability in openclaw (npm), affecting versions < 2026.2.21. It is fixed in 2026.2.21. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. Which versions of openclaw are affected by CVE-2026-4039? openclaw (npm) versions < 2026.2.21 is affected.
  3. Is there a fix for CVE-2026-4039? Yes. CVE-2026-4039 is fixed in 2026.2.21. Upgrade to this version or later.
  4. Is CVE-2026-4039 exploitable, and should I be worried? Whether CVE-2026-4039 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-4039 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-4039? Upgrade openclaw to 2026.2.21 or later.

Other vulnerabilities in openclaw

Stop the waste.
Protect your environment with Kodem.