Skip to main content
EPSS 0.2%top 92%

Openclaw cli: OpenClaw has a CWD `.env` environment variable injection which bypasses host-env policy and allows config takeover (CVE-2026-41294)

0
Critical
Published: 08/13/2026 (08/13/2026, 17:21:32 UTC)
Source: GCVE Database
Product: openclaw-cli

Description

OpenClaw CLI versions up to 2026.3.24 have a vulnerability where the current working directory's .env file is loaded before the trusted configuration directory. This allows an attacker with control over the workspace to inject environment variables that override runtime configuration and security-sensitive settings. The issue is fixed in version 2026.3.28 and later.

CVSS v3.1

Score 9.6critical

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

Homebrewmore threats →ghsa
openclaw-cli
pkg:brew/openclaw-cli
Affected versions
>=2026.1.29 <2026.3.28

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/04/2026, 12:52:05 UTC

Technical Analysis

OpenClaw CLI improperly loads the .env file from the current working directory before loading the trusted state-dir configuration. This behavior allows an untrusted workspace or repository containing a malicious .env file to inject environment variables that override host environment settings, potentially leading to configuration takeover. The vulnerability affects source files src/infra/dotenv.ts and src/cli/dotenv.ts. The issue is fixed in version 2026.3.28 by filtering untrusted CWD .env entries before OpenClaw startup.

Potential Impact

An attacker who can place a malicious .env file in a repository or workspace can override runtime configuration and security-sensitive environment variables when OpenClaw starts in that directory. This can lead to complete compromise of the host environment, including confidentiality, integrity, and availability impacts as indicated by the CVSS score of 9.6.

Mitigation Recommendations

A fix is available and included in OpenClaw CLI version 2026.3.28 and later. Users should upgrade to version 2026.3.28 or newer to mitigate this vulnerability. No additional mitigation steps are required once the update is applied.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-openclaw-cli-CVE-2026-41294
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1

Threat ID: 6ac245a812601ec6a31661b2

Added to database: 10/04/2026, 12:25:12 UTC

Last enriched: 10/04/2026, 12:52:05 UTC

Last updated: 10/04/2026, 16:08:38 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses