Junglewise Threat Intelligence

OpenClaw untrusted search path via STATE_DIRECTORY environment variable

Severity: high · CVSS 7.1 · Published 2026-06-16

Technologies: Openclaw. Vendors: Openclaw.

Executive brief

OpenClaw is a development tool used for managing workspaces and dependencies. A vulnerability exists where an attacker can use a specially crafted configuration file to trick the software into loading malicious code from an unexpected location on the local system. If a user opens a compromised workspace, an attacker could gain unauthorized access to data or execute arbitrary commands on the user's machine.

Technical details

OpenClaw before version 2026.5.2 is vulnerable to an untrusted search path (CWE-426) via environment variable injection. The application processes '.env' files within a workspace before resolving bundled runtime dependency roots. An attacker can manipulate the 'STATE_DIRECTORY' environment variable within a malicious workspace to point to an arbitrary local directory. When a trusted operator opens the workspace and dependency resolution occurs, the application may load and execute malicious code from the attacker-controlled path. This requires local access to place the malicious files and user interaction to open the workspace. The issue is patched in version 2026.5.2.

Affected products

  • OpenClaw openclaw < 2026.5.2

Timeline

  • 2026-05-28: advisory: Original GHSA-wc84-j36w-pw4x published
  • 2026-06-16: disclosed: CVE-2026-53858 published
  • 2026-06-18: patched: Duplicate advisory GHSA-4qgr-57jq-93vh withdrawn/updated

References

Related threats