CVE-2026-35651: OpenClaw: ANSI injection spoof AI agent approval prompts
MEDIUMOpenClaw AI agent framework (versions 2026.2.13–2026.3.24) contains an ANSI escape sequence injection flaw (CWE-150) that lets attackers manipulate terminal output in human approval prompts by embedding control characters in malicious tool metadata. The direct blast radius is any team relying on OpenClaw's built-in approval prompts as a human-in-the-loop control — the very mechanism designed to prevent unauthorized agent actions can be visually spoofed to display a benign-looking tool name while the actual invocation executes something entirely different. CVSS sits at 4.3 (Medium) with no active exploitation in the wild, no public exploit code, and no CISA KEV listing — but this vulnerability targets the oversight layer rather than compute or data, making it architecturally significant beyond its score for teams where human approval is the primary agentic safety control. Upgrade to a build after 2026.3.24 (commit 464e2c10) and audit permission logs for raw ANSI control sequences (patterns beginning with \x1b[) that may indicate prior exploitation.
Risk Assessment
The raw CVSS score of 4.3 understates real-world risk in agentic AI environments. While exploitation requires user interaction — attenuating automated mass exploitation — the attack strikes directly at human oversight controls that AI security frameworks treat as a primary safeguard. An agent framework where approval prompts can be visually spoofed reduces the human reviewer to a security theater participant. Teams that have implemented human-in-the-loop approval as their primary control against unauthorized agentic actions should treat this as functionally higher risk than the score implies. The absence of EPSS data, public exploits, and KEV listing keeps this from emergency-patch territory, but its novelty as an oversight-evasion vector warrants prompt remediation in any environment running OpenClaw agent pipelines.
Attack Kill Chain
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| openclaw | pip | — | No patch |
Do you use openclaw? You're affected.
Severity & Risk
Attack Surface
Recommended Action
- Patch: upgrade OpenClaw to a release incorporating commit 464e2c10a5edceb380d815adb6ff56e1a4c50f60.
- Detection: scan permission logs and terminal captures for raw ANSI control sequences (regex: \x1b\[[0-9;]*[A-Za-z] or ESC character \x1b); presence in approval logs indicates potential exploitation.
- Short-term workaround if immediate patching is not possible: pipe approval prompt output through a terminal ANSI sanitizer (strip-ansi or equivalent) or route approvals through a GUI/web interface that does not interpret ANSI escape codes.
- Process control: require secondary out-of-band confirmation for high-privilege tool approvals until patched, using a separate channel not subject to terminal rendering.
- Log integrity: correlate tool invocation records against structured API-level logs rather than terminal output to detect spoofing discrepancies.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-35651?
OpenClaw AI agent framework (versions 2026.2.13–2026.3.24) contains an ANSI escape sequence injection flaw (CWE-150) that lets attackers manipulate terminal output in human approval prompts by embedding control characters in malicious tool metadata. The direct blast radius is any team relying on OpenClaw's built-in approval prompts as a human-in-the-loop control — the very mechanism designed to prevent unauthorized agent actions can be visually spoofed to display a benign-looking tool name while the actual invocation executes something entirely different. CVSS sits at 4.3 (Medium) with no active exploitation in the wild, no public exploit code, and no CISA KEV listing — but this vulnerability targets the oversight layer rather than compute or data, making it architecturally significant beyond its score for teams where human approval is the primary agentic safety control. Upgrade to a build after 2026.3.24 (commit 464e2c10) and audit permission logs for raw ANSI control sequences (patterns beginning with \x1b[) that may indicate prior exploitation.
Is CVE-2026-35651 actively exploited?
No confirmed active exploitation of CVE-2026-35651 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-35651?
1. Patch: upgrade OpenClaw to a release incorporating commit 464e2c10a5edceb380d815adb6ff56e1a4c50f60. 2. Detection: scan permission logs and terminal captures for raw ANSI control sequences (regex: \x1b\[[0-9;]*[A-Za-z] or ESC character \x1b); presence in approval logs indicates potential exploitation. 3. Short-term workaround if immediate patching is not possible: pipe approval prompt output through a terminal ANSI sanitizer (strip-ansi or equivalent) or route approvals through a GUI/web interface that does not interpret ANSI escape codes. 4. Process control: require secondary out-of-band confirmation for high-privilege tool approvals until patched, using a separate channel not subject to terminal rendering. 5. Log integrity: correlate tool invocation records against structured API-level logs rather than terminal output to detect spoofing discrepancies.
What systems are affected by CVE-2026-35651?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, human-in-the-loop approval pipelines, multi-tool AI orchestration.
What is the CVSS score for CVE-2026-35651?
CVE-2026-35651 has a CVSS v3.1 base score of 4.3 (MEDIUM).
Technical Details
NVD Description
OpenClaw versions 2026.2.13 through 2026.3.24 contain an ANSI escape sequence injection vulnerability in approval prompts that allows attackers to spoof terminal output. Untrusted tool metadata can carry ANSI control sequences into approval prompts and permission logs, enabling attackers to manipulate displayed information through malicious tool titles.
Exploitation Scenario
An adversary publishes a malicious AI agent tool to a public registry or compromises a private tool repository accessible to the target's OpenClaw deployment. The tool's metadata title contains crafted ANSI escape sequences — for example, cursor-up and line-erase sequences followed by 'Read-only directory listing (safe)' — while the actual tool definition executes a data exfiltration or lateral movement command. When a developer or SOC analyst running OpenClaw encounters the approval prompt for this tool, the terminal display overwrites the real tool name with the spoofed benign label. The analyst approves the action, the malicious tool executes with full agent-level permissions. Because the permission log also captures the unsanitized title, the audit trail records the spoofed name — giving the attacker both execution and post-incident cover.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N References
Timeline
Related Vulnerabilities
CVE-2026-30741 9.8 OpenClaw: RCE via request-side prompt injection
Same package: openclaw CVE-2026-28451 9.3 OpenClaw: SSRF via Feishu extension exposes internal services
Same package: openclaw GHSA-m3mh-3mpg-37hw 8.6 OpenClaw: .npmrc hijack enables RCE on plugin install
Same package: openclaw CVE-2026-27001 7.8 OpenClaw: prompt injection via unsanitized workspace path
Same package: openclaw GHSA-hr5v-j9h9-xjhg 7.7 OpenClaw: sandbox escape via mediaUrl path traversal
Same package: openclaw
AI Threat Alert