Every CVE Search/ Get API key

CVE-2026-32040

OpenClaw < 2026.2.23 - HTML Injection via Unvalidated Image MIME Type in Data-URL Interpolation

2.4 LowFix available

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

0.16%Up 0.1 points since Mar 20, 2026
90%50%10%1%

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 LowCVSS: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 MediumCVSS: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 LowCVSS: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

  1. Craft a session entry with an image content block where mimeType is set to image/png" onerror="alert(document.domain)
  2. Export the session to HTML
  3. Open the exported HTML — the injected onerror fires

Remediation

  • Added sanitizeImageMimeType() helper that validates mimeType against a whitelist of known image MIME types
  • Falls back to application/octet-stream for unrecognized values, preventing attribute breakout

Fix

https://github.com/openclaw/openclaw/pull/24140

Record
GHSA-2ww6-868g-2c56
CVSS 4.0
2.4 LowCVSS: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 MediumCVSS: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 LowCVSS: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 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
CVSS 3.1
6.1 MediumCVSS: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 LowCVSS: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

  1. Craft a session entry with an image content block where mimeType is set to image/png" onerror="alert(document.domain)
  2. Export the session to HTML
  3. Open the exported HTML — the injected onerror fires

Remediation

  • Added sanitizeImageMimeType() helper that validates mimeType against a whitelist of known image MIME types
  • Falls back to application/octet-stream for unrecognized values, preventing attribute breakout

Fix

https://github.com/openclaw/openclaw/pull/24140

Record
GHSA-2ww6-868g-2c56
CVSS 4.0
2.4 LowCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
openclaw
npm
before 2026.2.23
2026.2.23

History

History
RecordedChangedSources
referencesOSV
referencesCVE List
factsEUVD
first indexedCVE 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

MoveEnter Open