CVE-2026-32022 in OpenClawinfo

Summary

by MITRE • 03/20/2026

OpenClaw versions prior to 2026.2.21 contain a stdin-only policy bypass vulnerability in the grep tool within tools.exec.safeBins that allows attackers to read arbitrary files by supplying a pattern via the -e flag parameter. Attackers can include a positional filename operand to bypass file access restrictions and read sensitive files.env from the working directory.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 05/27/2026

The vulnerability identified as CVE-2026-32022 represents a critical security flaw in OpenClaw versions earlier than 2026.2.21 that specifically targets the grep tool functionality within the tools.exec.safeBins module. This issue manifests as a stdin-only policy bypass that fundamentally undermines the intended security controls designed to prevent unauthorized file access operations. The flaw exploits a design weakness in how the system processes command-line arguments and handles file access restrictions, creating a pathway for malicious actors to circumvent established security boundaries.

Technical exploitation of this vulnerability occurs through the strategic use of the -e flag parameter within the grep tool's execution context. When attackers supply a pattern through this flag and subsequently include a positional filename operand, the system's file access controls fail to properly validate the operation. This particular attack vector leverages the inherent behavior of grep when processing multiple arguments, allowing the tool to interpret the positional operand as a filename rather than a pattern. The vulnerability specifically affects the way the safeBins module enforces access restrictions, creating a scenario where stdin-only policies are effectively bypassed without proper authentication or authorization checks.

The operational impact of this vulnerability extends beyond simple file reading capabilities, as it enables attackers to access sensitive configuration files that typically contain critical system information. The ability to read .env files from the working directory represents a significant compromise since these files often contain database credentials, API keys, application secrets, and other sensitive environment variables that are essential for system operation. This access can lead to complete system compromise, data exfiltration, and potential lateral movement within the affected environment. The vulnerability's exploitation requires minimal privileges and can be executed through standard command-line interfaces, making it particularly dangerous in multi-user or shared system environments.

Security controls for this vulnerability align with several established frameworks including CWE-22 which addresses path traversal vulnerabilities and CWE-78 which covers improper neutralization of special elements used in OS commands. The attack pattern follows ATT&CK technique T1059.001 for command and scripting interpreter and T1078 for valid accounts, as the exploitation typically requires legitimate user access to execute the vulnerable command. Organizations should implement immediate mitigations including updating to OpenClaw version 2026.2.21 or later, implementing strict input validation for grep tool usage, and restricting access to sensitive environment files through proper file system permissions. Additional defensive measures should include monitoring for unusual grep command patterns, implementing principle of least privilege for system users, and conducting regular security audits of command execution modules to identify similar policy bypass vulnerabilities.

Responsible

VulnCheck

Reservation

03/10/2026

Disclosure

03/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00079

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!