CVE-2026-35651: OpenClaw has ACP CLI approval prompt ANSI escape sequence injection
OpenClaw 2026.2.13 through 2026.3.24 let ACP tool titles carry ANSI escape sequences into the CLI approval prompt and permission logs. Untrusted tool metadata could redraw the terminal and make a risky request look harmless. Upgrade openclaw to 2026.3.28, the patched version in the package data.
Published Mar 29, 2026 · Updated Apr 24, 2026 · Analysis Oct 31, 2026
What an attacker can do
When an ACP tool asks for permission, the OpenClaw CLI shows the tool title in an approval prompt and writes it to the permission log. The title came from tool metadata and was printed as is. The old ANSI stripper only matched SGR color codes ending in m, so cursor-movement and erase sequences passed through.
A malicious or compromised tool server, or a prompt-injected title, can use those sequences to overwrite or hide parts of the prompt line. The person approving sees different text from what the tool really asked for. This is output spoofing (CWE-150, CWE-116). It needs the user to act on the prompt, so the CVSS vectors give user interaction and low integrity impact, 4.3 on CVSS 3.1.
The flaw does not run code by itself. The harm comes from a spoofed approval, where a user grants a permission they would have refused had they seen the true title.
Who is affected
openclaw from 2026.2.13 up to and including 2026.3.24. Versions before 2026.2.13 do not have the flaw. It matters for users of the ACP CLI who approve tool permissions at a terminal. Check the version:
npm ls openclawopenclaw
- Ecosystem
- npm
- Affected
- >= 2026.2.13, <= 2026.3.24
- Fixed in
- 2026.3.28
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.28:
npm install [email protected]The advisory text names 2026.3.25 as the first patched version; the package data says 2026.3.28, so use that or newer. Commit 464e2c10a5ed sanitizes titles at the source in formatToolTitle in src/acp/event-mapper.ts, wraps the title in sanitizeTerminalText inside resolvePermissionRequest in src/acp/client.ts, and widens the stripper in src/terminal/ansi.ts to every CSI sequence. Until you upgrade, read approval prompts with care and decline unclear ones.
How to tell if you were hit
Search saved permission logs and terminal captures for raw escape bytes (ESC, 0x1b) inside tool titles, particularly cursor-up, erase-line or carriage-return sequences. Use cat -v or a hex view on the log file so the escapes show. Beam records the shell commands and MCP tool calls an agent makes, so you can compare what actually ran with what the prompt displayed.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
ACP CLI approval prompt ANSI escape sequence injection
Affected Packages / Versions
- Package:
openclaw - Affected versions:
>= 2026.2.13, <= 2026.3.24 - First patched version:
2026.3.25 - Latest published npm version at verification time:
2026.3.24
Details
ACP tool titles could previously carry ANSI control sequences into approval prompts and permission logs, letting untrusted tool metadata spoof terminal output. Commit 464e2c10a5edceb380d815adb6ff56e1a4c50f60 sanitizes tool titles at the source and broadens ANSI stripping to full CSI sequences.
Verified vulnerable on tag v2026.3.24 and fixed on main by commit 464e2c10a5edceb380d815adb6ff56e1a4c50f60.
Fix Commit(s)
464e2c10a5edceb380d815adb6ff56e1a4c50f60
Credited to nexrin, KeenSecurityLab, qclawer, anlakii, simon-reisinger-dynatrace.
Questions
- What is ANSI escape sequence injection?
It is embedding terminal control codes in text so that, when printed, they move the cursor or erase text and change what the viewer sees. Here the text was an ACP tool title.
- Does CVE-2026-35651 execute code?
Not directly. It spoofs the approval prompt, so a user may approve something they misread. Impact is low integrity per the CVSS vectors.
- Which sequences did the old filter miss?
It stripped only SGR sequences ending in m. Cursor movement and erase CSI sequences got through. The fix matches any CSI sequence.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
