Skip to main content

Openclaw cli: OpenClaw has stored XSS in exported session HTML viewer via markdown/raw-HTML rendering

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

Description

OpenClaw CLI versions up to 2026.2.22-2 have a stored cross-site scripting (XSS) vulnerability in the exported session HTML viewer. This occurs because raw HTML markdown tokens and unescaped metadata fields are rendered without proper sanitization, allowing attacker-controlled JavaScript to execute when opening a crafted exported session file. The vulnerability was patched in version 2026.2.23 by escaping raw HTML tokens and metadata fields and adding image MIME sanitization.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Affected software

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

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:29:47 UTC

Technical Analysis

The OpenClaw CLI exported session HTML viewer allowed stored XSS due to rendering markdown with marked.parse(...) and inserting HTML via innerHTML without overriding the html renderer token path. This permitted raw HTML, including malicious scripts (e.g., <img src=x onerror=...>), to be passed through unescaped. Additionally, tree and header metadata fields were interpolated without escaping in the export template. Opening a crafted exported HTML session file could execute attacker-controlled JavaScript in the viewer context, exposing session content and enabling phishing or UI spoofing. The issue was fixed by overriding the marked html(token) renderer to escape raw HTML tokens, escaping metadata fields, adding image MIME sanitization, and regression tests. The fix was released in version 2026.2.23.

Potential Impact

An attacker can craft a session with malicious HTML content that, when exported and opened in the OpenClaw HTML viewer, executes arbitrary JavaScript. This can lead to exposure of session data and enable phishing or UI spoofing attacks within the trusted export view. There is no indication of privilege escalation or remote code execution beyond the viewer context.

Mitigation Recommendations

A patch is available in OpenClaw CLI version 2026.2.23 and later. Users should upgrade to this version or newer to remediate the stored XSS vulnerability. The fix includes escaping raw HTML tokens and metadata fields in the exported HTML and adding image MIME sanitization. No additional mitigation actions are required beyond applying the official fix.

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-GHSA-r294-2894-92j3
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
4.0

Threat ID: 6ac2458312601ec6a3164072

Added to database: 10/04/2026, 12:24:35 UTC

Last enriched: 10/04/2026, 12:29:47 UTC

Last updated: 10/04/2026, 12:29:47 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