GHSA-hxvm-xjvf-93f3: openclaw: env namespace injection steers agent runtime
GHSA-hxvm-xjvf-93f3 MEDIUMOpenClaw's workspace .env loader failed to block the full OPENCLAW_ variable namespace, letting a malicious workspace set variables like OPENCLAW_GIT_DIR to redirect source-update or installer flows during legitimate agent execution. The blast radius is currently narrow — only 4 downstream npm dependents tracked, no public exploit code exists, and there is no CISA KEV listing or EPSS data suggesting active scanning — so opportunistic exploitation is unlikely at this time. The risk concentrates in developer and CI environments where teams routinely open external or partner-supplied workspaces and trigger OpenClaw agent flows from within them, making it a targeted rather than spray-and-pray threat. Upgrade to openclaw 2026.4.20, which reserves the full OPENCLAW_ namespace and rejects conflicting dotenv entries from workspace-controlled files.
What is the risk?
Medium risk overall. Exploitation requires tricking a user or CI pipeline into running OpenClaw from an attacker-controlled workspace — a meaningful precondition that limits opportunistic exploitation. With no public exploit, no KEV entry, and only 4 tracked downstream dependents, immediate blast radius is contained. However, in agentic developer tooling workflows where OpenClaw handles git operations or package installs, successful exploitation could redirect trusted runtime actions to attacker infrastructure, producing outsized downstream consequences relative to the CVE severity label.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| OpenClaw | npm | < 2026.4.20 | 2026.4.20 |
Do you use OpenClaw? You're affected.
How severe is it?
What should I do?
5 steps-
Upgrade openclaw (npm) to 2026.4.20 or later immediately — this is the only full fix.
-
Until patched, audit all workspace .env files for OPENCLAW_-prefixed entries before executing any OpenClaw flows.
-
Do not run OpenClaw from untrusted, externally sourced, or partner-supplied workspaces on unpatched versions.
-
In CI environments, sanitize or strip workspace dotenv variables matching OPENCLAW_* before agent invocation.
-
Monitor OpenClaw execution logs for unexpected git remote targets or installer source changes as a detection signal.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is GHSA-hxvm-xjvf-93f3?
OpenClaw's workspace .env loader failed to block the full OPENCLAW_ variable namespace, letting a malicious workspace set variables like OPENCLAW_GIT_DIR to redirect source-update or installer flows during legitimate agent execution. The blast radius is currently narrow — only 4 downstream npm dependents tracked, no public exploit code exists, and there is no CISA KEV listing or EPSS data suggesting active scanning — so opportunistic exploitation is unlikely at this time. The risk concentrates in developer and CI environments where teams routinely open external or partner-supplied workspaces and trigger OpenClaw agent flows from within them, making it a targeted rather than spray-and-pray threat. Upgrade to openclaw 2026.4.20, which reserves the full OPENCLAW_ namespace and rejects conflicting dotenv entries from workspace-controlled files.
Is GHSA-hxvm-xjvf-93f3 actively exploited?
No confirmed active exploitation of GHSA-hxvm-xjvf-93f3 has been reported, but organizations should still patch proactively.
How to fix GHSA-hxvm-xjvf-93f3?
1. Upgrade openclaw (npm) to 2026.4.20 or later immediately — this is the only full fix. 2. Until patched, audit all workspace .env files for OPENCLAW_-prefixed entries before executing any OpenClaw flows. 3. Do not run OpenClaw from untrusted, externally sourced, or partner-supplied workspaces on unpatched versions. 4. In CI environments, sanitize or strip workspace dotenv variables matching OPENCLAW_* before agent invocation. 5. Monitor OpenClaw execution logs for unexpected git remote targets or installer source changes as a detection signal.
What systems are affected by GHSA-hxvm-xjvf-93f3?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, CI/CD pipelines, developer tooling.
What is the CVSS score for GHSA-hxvm-xjvf-93f3?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0011 User Execution AML.T0080 AI Agent Context Poisoning AML.T0081 Modify AI Agent Configuration Compliance Controls Affected
What are the technical details?
Original Advisory
## Affected Packages / Versions - Package: `openclaw` (npm) - Affected versions: `< 2026.4.20` - Patched version: `2026.4.20` ## Impact Workspace `.env` loading did not reserve the `OPENCLAW_` runtime-control namespace broadly enough. A malicious workspace could set variables such as `OPENCLAW_GIT_DIR` before source-update or installer flows, potentially steering trusted OpenClaw runtime behavior. This requires running OpenClaw from an attacker-controlled workspace. Severity is medium. ## Fix OpenClaw now reserves the workspace `OPENCLAW_` environment namespace and rejects workspace dotenv entries for OpenClaw runtime-control variables. Fix commit: - `018494fa3ebb9145112e68b56fe1cb2e9f9a9ed6` ## Release Fixed in OpenClaw `2026.4.20`.
Exploitation Scenario
An attacker publishes a public repository on GitHub or distributes a workspace package via ClawHub containing a crafted .env file with OPENCLAW_GIT_DIR set to an attacker-controlled server. A developer or automated CI job clones the repo and runs OpenClaw from within it — triggering a source-update or installer flow that fetches code or binaries from the attacker's infrastructure instead of the legitimate upstream. The malicious payload executes within the trusted OpenClaw runtime context, enabling credential exfiltration (as seen in AIID #1368), persistent backdoor installation, or lateral movement within the developer's environment.
Weaknesses (CWE)
CWE-184 — Incomplete List of Disallowed Inputs: The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
- [Implementation] Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify "good" input - such as lists of allowed inputs - and ensure that you are properly encoding your outputs.
Source: MITRE CWE corpus.
References
Timeline
Related Vulnerabilities
CVE-2026-33579 9.9 OpenClaw: scope bypass escalates low-priv to admin
Same package: openclaw CVE-2026-32922 9.9 OpenClaw: privilege escalation to RCE via token scope bypass
Same package: openclaw CVE-2026-53838 9.8 OpenClaw: approval scope bypass via reconnection state
Same package: openclaw CVE-2026-30741 9.8 OpenClaw: RCE via request-side prompt injection
Same package: openclaw CVE-2026-32038 9.8 Analysis pending
Same package: openclaw