openclaw
Affected
- introduced
0, fixed2026.2.23(semver)
Fixed versions
2026.2.23
Fix
- Fixed version
2026.2.23npm install [email protected]
Advisory
Also known as: CVE-2026-32040
OpenClaw Vulnerable to HTML injection via unvalidated image MIME type in data-URL interpolation
Summary
The HTML session exporter (src/auto-reply/reply/export-html/template.js) interpolates img.mimeType directly into <img src="data:..."> attributes without validation or escaping. A crafted mimeType value (e.g., x" onerror="alert(1)) can break out of the attribute context and execute arbitrary JavaScript.
Impact
An attacker who can control image entries in session data (via crafted tool results or session manipulation) can achieve XSS when the exported HTML is opened. The precondition is tighter than the main XSS finding (requires image content blocks with a malicious mimeType), but exploitation is straightforward.
Affected components
src/auto-reply/reply/export-html/template.js — line 1032 (tool result images), line 1306 (user message images)Reproduction
mimeType is set to image/png" onerror="alert(document.domain)onerror firesRemediation
sanitizeImageMimeType() helper that validates mimeType against a whitelist of known image MIME typesapplication/octet-stream for unrecognized values, preventing attribute breakoutFix
https://github.com/openclaw/openclaw/pull/24140
Low Basis: The source's own band: LOW
0, fixed 2026.2.23 (semver)2026.2.23
2026.2.23npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0