CVE-2026-43531: OpenClaw: Workspace .env could inject OpenClaw runtime-control variables
OpenClaw before 2026.4.9 loaded a workspace `.env` file without filtering OpenClaw's own runtime-control variables. A malicious repository could ship a `.env` that changes update sources, gateway URLs, ClawHub resolution or browser executable paths. Upgrade the `openclaw` npm package to 2026.4.9 or later.
Published Apr 17, 2026 · Updated May 8, 2026 · Analysis Oct 29, 2026
What an attacker can do
Many tools read a .env file from the project folder. OpenClaw did so for the workspace, and it let that file set variables that control OpenClaw itself (CWE-15, external control of a configuration setting). The advisory names four areas: update sources, gateway URLs, ClawHub resolution and browser executable paths, plus related behavior. It does not list the variable names.
That makes a cloned repository an attack path. Someone who can get a repository or workspace in front of you can include a .env that redirects OpenClaw to a gateway or update source they run, or points the browser setting at a program of their choice. A browser executable path is a path to code OpenClaw will launch, so the effect can reach code execution. The advisory does not walk through a chain, so treat that as a reasoned risk, not a confirmed exploit.
The CVSS 4.0 vector is local with user interaction: the victim opens the workspace in OpenClaw. Developers who open untrusted repositories, and agents that check out third-party code, are the exposed group.
Who is affected
The openclaw npm package, all versions below 2026.4.9. The risk arises when OpenClaw runs in a workspace you did not author. Check the installed version:
npm ls -g openclawAlso look at any .env in workspaces you open, especially cloned third-party repositories.
openclaw
- Ecosystem
- npm
- Affected
- < 2026.4.9
- Fixed in
- 2026.4.9
- Check
npm ls openclaw
How to fix it
Upgrade to 2026.4.9 or newer. The advisory says 2026.4.14 includes the fix as well.
npm install -g openclaw@latestThe fix (PR #62660, commit dbfcef3) blocks OpenClaw runtime-control keys and key families from workspace .env loading. The advisory lists no workaround. Until you upgrade, avoid running OpenClaw in untrusted workspaces.
How to tell if you were hit
Open the .env in workspaces you used with an affected version and look for OpenClaw-related variables you did not set, especially ones with URLs or file paths. Check OpenClaw's effective update source, gateway URL and browser path against what you configured. Look for connections to hosts you do not recognize. The advisory gives no log signature or variable names.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Workspace .env could inject OpenClaw runtime-control variables.
Affected Packages / Versions
- Package:
openclaw - Ecosystem: npm
- Affected versions:
< 2026.4.9 - Patched versions:
>= 2026.4.9
Impact
A malicious workspace .env file could set OpenClaw runtime-control variables affecting update sources, gateway URLs, ClawHub resolution, browser executable paths, and related behavior.
Technical Details
The fix blocks OpenClaw runtime-control keys and key families from workspace .env loading.
Fix
The issue was fixed in #62660. The first stable tag containing the fix is v2026.4.9, and [email protected] includes the fix.
Fix Commit(s)
dbfcef319618158fa40b31cdac386ea34c392c0c- PR: #62660
Release Process Note
Users should upgrade to openclaw 2026.4.9 or newer. The latest npm release, 2026.4.14, already includes the fix.
Credits
Thanks to @zsxsoft, with sponsorship from @KeenSecurityLab for reporting this issue.
Credited to zsxsoft, KeenSecurityLab.
Questions
- What does the malicious .env change?
Per the advisory, OpenClaw runtime-control variables: update sources, gateway URLs, ClawHub resolution and browser executable paths, among related behavior.
- Which version fixes CVE-2026-43531?
2026.4.9. Versions below it are affected, and 2026.4.14 includes the fix.
- Does it need user interaction?
The CVSS 4.0 vector shows local access with user interaction, so someone has to open the malicious workspace in OpenClaw.
- Is it exploited in the wild?
No source I read says so, and the entry has no CISA KEV data.
References
Read for this analysis:
- https://github.com/openclaw/openclaw/pull/62660
- https://github.com/openclaw/openclaw/commit/dbfcef319618158fa40b31cdac386ea34c392c0c
- https://nvd.nist.gov/vuln/detail/CVE-2026-43531
- https://www.vulncheck.com/advisories/openclaw-environment-variable-injection-via-workspace-env-file
- https://github.com/advisories/GHSA-7wv4-cc7p-jhxc
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
