Junglewise Threat Intelligence

OpenClaw environment variable injection in Gmail setup gcloud execution

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

Technologies: Openclaw. Vendors: Openclaw.

Executive brief

OpenClaw, a tool used for managing cloud-based workflows, is vulnerable to a security flaw during its Gmail setup process. An attacker who can contribute files to a project repository can trick the system into running malicious code by manipulating environment settings. This could allow an attacker to gain unauthorized control over the operator's local system or access sensitive data.

Technical details

OpenClaw before version 2026.5.2 is vulnerable to an Untrusted Search Path (CWE-426) issue. The vulnerability exists because workspace .env files can influence the Python runtime selection by injecting the CLOUDSDK_PYTHON environment variable during the execution of 'gcloud' for Gmail setup. An attacker with repository access can provide a malicious .env file that points to a rogue Python executable. When a trusted operator opens the workspace and initiates the Gmail setup, the system executes the attacker-controlled Python path, leading to arbitrary code execution. The issue is patched in version 2026.5.2.

Affected products

  • OpenClaw openclaw < 2026.5.2

Timeline

  • 2026-05-28: advisory: Original advisory GHSA-fq9j-vw4w-fr6v published
  • 2026-06-16: disclosed: CVE-2026-53842 published
  • 2026-06-18: other: Duplicate advisory GHSA-9fr2-p65v-gqxq withdrawn

References

Related threats