OpenClaw HTML Injection Vulnerability in Session Exporter Allowing Cross-Site Scripting

Vulnerability

A HTML injection vulnerability has been identified in OpenClaw versions prior to 2026.2.23. This issue resides in the HTML session exporter, where unvalidated image MIME type values can be injected into image content blocks. Attackers can exploit this by crafting session entries that include malicious MIME types, which break out of the image source data-URL context. When the exported HTML is opened, this injection allows for the execution of arbitrary JavaScript, leading to cross-site scripting (XSS) vulnerabilities.

Impact

Exploitation of this vulnerability allows for cross-site scripting (XSS) attacks, where injected JavaScript is executed in the context of the user's browser.

Reproduction

To reproduce this vulnerability, create a session entry that includes an image content block. Set the 'mimeType' attribute to a crafted value, such as 'image/png' followed by a JavaScript payload, such as an 'onerror' event. Once the session entry is crafted, export the session to HTML. When the exported HTML is opened, the injected JavaScript will execute, demonstrating the cross-site scripting vulnerability.

Remediation

Users can update to OpenClaw version 2026.2.23 or later, where this vulnerability has been patched.

Added: Mar 19, 2026, 10:28 PM
Updated: Mar 19, 2026, 10:28 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.7
exploitability
6.5
remediation
0.0
relevance
4.1
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.