7.0high
OpenClaw < 2026.5.2 - Arbitrary Runtime Dependency Loading via STATE_DIRECTORY Environment Variable
- Severity
- 7.0high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.12% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-wc84-j36w-pw4x
Description
OpenClaw before 2026.5.2 contains an environment variable injection vulnerability where workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. Attackers can manipulate the STATE_DIRECTORY variable to load runtime dependencies from unintended local paths, potentially executing malicious code during dependency resolution.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OpenClaw OpenClaw | before 2026.5.2 Not affected: 2026.5.2 | CVE List, NVD |
| openclaw (npm) | before 2026.5.2 | GitHub Advisory Database |
All scores
| VulnCheck | 7.0high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
OpenClaw before 2026.5.2 contains an environment variable injection vulnerability where workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. Attackers can manipulate the STATE_DIRECTORY variable to load runtime dependencies from unintended local paths, potentially executing malicious code during dependency resolution.
GitHub Advisory Database
Summary
Workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. In affected versions, a workspace .env in a repository opened by a trusted operator could set STATE_DIRECTORY before runtime dependency root resolution.
This advisory is scoped to the named feature and configuration. It does not change OpenClaw's trusted-operator model: authenticated Gateway operators, installed plugins, and intentional local execution surfaces remain trusted unless a separate policy, approval, allowlist, sandbox, or auth boundary is crossed.
Impact
When the affected feature is enabled and reachable, this could load bundled runtime dependencies from an unintended local state path. Practical impact depends on the operator's configuration and whether lower-trust input can reach that path.
Patched Versions
The first stable patched version is 2026.5.2.
Mitigations
avoid opening untrusted workspace env files before runtime dependency installation until patched. As general hardening, keep channel and tool allowlists narrow, avoid sharing one Gateway between mutually untrusted users, and disable the affected feature when it is not needed.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-53858 changed 2026-06-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wc84-j36w-pw4x changed 2026-06-18 | CC-BY-4.0 |
| NVD | CVE-2026-53858 changed 2026-06-18 | Public domain |