CVE-2026-32040
OpenClaw < 2026.2.23 - HTML Injection via Unvalidated Image MIME Type in Data-URL Interpolation
OpenClaw versions prior to 2026.2.23 contain an html injection vulnerability in the HTML session exporter that allows attackers to execute arbitrary javascript by injecting malicious mimeType values in image content blocks. Attackers can craft session entries with specially crafted mimeType attributes that break out of the img src data-URL context to achieve cross-site scripting when exported HTML is opened.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
2.4
OpenClaw < 2026.2.23 - HTML Injection via Unvalidated Image MIME Type in Data-URL Interpolation
OpenClaw versions prior to 2026.2.23 contain an html injection vulnerability in the HTML session exporter that allows attackers to execute arbitrary javascript by injecting malicious mimeType values in image content blocks. Attackers can craft session entries with specially crafted mimeType attributes that break out of the img src data-URL context to achieve cross-site scripting when exported HTML is opened.
- Record
CVE-2026-32040- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-08
EUVDEUVD-2026-13328
2.4
OpenClaw versions prior to 2026.2.23 contain an html injection vulnerability in the HTML session exporter that allows attackers to execute arbitrary javascript by injecting malicious mimeType values in image content blocks. Attackers can craft session entries with specially crafted mimeType attributes that break out of the img src data-URL context to achieve cross-site scripting when exported HTML is opened.
- Record
EUVD-2026-13328- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - Updated
- 2026-11-08
GitHub AdvisoriesGHSA-2ww6-868g-2c56
2.4
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
- Craft a session entry with an image content block where
mimeTypeis set toimage/png" onerror="alert(document.domain) - Export the session to HTML
- Open the exported HTML — the injected
onerrorfires
Remediation
- Added
sanitizeImageMimeType()helper that validates mimeType against a whitelist of known image MIME types - Falls back to
application/octet-streamfor unrecognized values, preventing attribute breakout
Fix
- Record
GHSA-2ww6-868g-2c56- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
2.4
OpenClaw versions prior to 2026.2.23 contain an html injection vulnerability in the HTML session exporter that allows attackers to execute arbitrary javascript by injecting malicious mimeType values in image content blocks. Attackers can craft session entries with specially crafted mimeType attributes that break out of the img src data-URL context to achieve cross-site scripting when exported HTML is opened.
- Record
CVE-2026-32040- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
2.4
OpenClaw < 2026.2.23 - HTML Injection via Unvalidated Image MIME Type in Data-URL Interpolation
OpenClaw versions prior to 2026.2.23 contain an html injection vulnerability in the HTML session exporter that allows attackers to execute arbitrary javascript by injecting malicious mimeType values in image content blocks. Attackers can craft session entries with specially crafted mimeType attributes that break out of the img src data-URL context to achieve cross-site scripting when exported HTML is opened.
- Record
CVE-2026-32040- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - Weakness
- CWE-79
- Updated
- 2026-11-09
OSVGHSA-2ww6-868g-2c56
2.4
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
- Craft a session entry with an image content block where
mimeTypeis set toimage/png" onerror="alert(document.domain) - Export the session to HTML
- Open the exported HTML — the injected
onerrorfires
Remediation
- Added
sanitizeImageMimeType()helper that validates mimeType against a whitelist of known image MIME types - Falls back to
application/octet-streamfor unrecognized values, preventing attribute breakout
Fix
- Record
GHSA-2ww6-868g-2c56- CVSS 4.0
- 2.4 Low
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N - CVSS 3.1
- 4.6 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
openclawnpm |
before 2026.2.23 | 2026.2.23 |
History
| Recorded | Changed | Sources |
|---|---|---|
| references | OSV | |
| references | CVE List | |
| facts | EUVD | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-32040 is a low vulnerability (CVSS 2.4) in Openclaw, published March 3, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.16%, the 4th percentile. Fixed in openclaw 2026.2.23.
References
github.com/openclaw/openclaw/security/advisories/GHSA-2ww6-868g-2c56
github.com/openclaw/openclaw/pull/24140
vulncheck.com/advisories/openclaw-html-injection-via-unvalidated-image-mime-type-in-data-url-interpolation
github.com/openclaw/openclaw/commit/f3adf142c195000cbde31200626a1d8c8b716df9
nvd.nist.gov/vuln/detail/CVE-2026-32040
github.com/advisories/GHSA-2ww6-868g-2c56
github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32040.json
github.com/openclaw/openclaw