| Advisory ID | github_osv/GHSA-2ww6-868g-2c56 |
| Aliases |
CVE-2026-32040
|
| Summary | 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 |
| Status | Published |
| Exploitability | 0.5 |
| Weighted Severity | 4.1 |
| Risk | 2.0 |
| Affected and Fixed Packages | Package Details |
| Introduced and Fixed Package Commit Patches | Package Commit Patches Details |
| System | Score | Found at |
|---|---|---|
| cvssv3.1 | 4.6 | https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-2ww6-868g-2c56/GHSA-2ww6-868g-2c56.json |
| cvssv4 | 2.4 | https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-2ww6-868g-2c56/GHSA-2ww6-868g-2c56.json |
| generic_textual | LOW |
| Reference id | Reference type | URL |
|---|---|---|
| https://github.com/openclaw/openclaw | ||
| https://github.com/openclaw/openclaw/commit/f3adf142c195000cbde31200626a1d8c8b716df9 | ||
| 24140 | Other | https://github.com/openclaw/openclaw/pull/24140 |
| CVE-2026-32040 | https://nvd.nist.gov/vuln/detail/CVE-2026-32040 | |
| GHSA-2ww6-868g-2c56 | Advisory | https://github.com/openclaw/openclaw/security/advisories/GHSA-2ww6-868g-2c56 |
| openclaw-html-injection-via-unvalidated-image-mime-type-in-data-url-interpolation | Advisory | https://www.vulncheck.com/advisories/openclaw-html-injection-via-unvalidated-image-mime-type-in-data-url-interpolation |
No EPSS data available for this advisory.
| Patch URL | |
|---|---|
| There are no known patches. | |
| Attack Vector (AV) | Attack Complexity (AC) | Privileges Required (PR) | User Interaction (UI) | Scope (S) | Confidentiality Impact (C) | Integrity Impact (I) | Availability Impact (A) |
|---|---|---|---|---|---|---|---|
network adjacent_network local physical |
low high |
none low high |
none required |
unchanged changed |
high low none |
high low none |
high low none |
| Attack Vector (AV) | Attack Complexity (AC) | Attack Requirements (AT) | Privileges Required (PR) | User Interaction (UI) | Vulnerable System Impact Confidentiality (VC) | Vulnerable System Impact Integrity (VI) | Vulnerable System Impact Availability (VA) | Subsequent System Impact Confidentiality (SC) | Subsequent System Impact Integrity (SI) | Subsequent System Impact Availability (SA) |
|---|---|---|---|---|---|---|---|---|---|---|
network adjacent local physical |
low high |
none present |
none low high |
none passive active |
high low none |
high low none |
high low none |
high low none |
high low none |
high low none |
Vector: SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2026-03-21T03:12:48Z/
Decision: Track
Source URL: https://github.com/cisagov/vulnrichment/blob/develop/2026/32xxx/CVE-2026-32040.json
Source Advisory: vulnrichment/CVE-2026-32040
[{'Exploitation': 'none'},
{'Automatable': 'no'},
{'Technical Impact': 'partial'},
{'Mission Prevalence': 'minimal'},
{'Public Well-being Impact': 'material'},
{'Mission & Well-being': 'medium'}]
Vector: SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2026-03-21T03:12:48Z/
Decision: Track
Source URL: https://github.com/cisagov/vulnrichment/blob/develop/2026/32xxx/CVE-2026-32040.json
Source Advisory: vulnrichment/CVE-2026-32040
[{'Exploitation': 'none'},
{'Automatable': 'no'},
{'Technical Impact': 'partial'},
{'Mission Prevalence': 'minimal'},
{'Public Well-being Impact': 'material'},
{'Mission & Well-being': 'medium'}]