Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-2ww6-868g-2c56

Опубликовано: 03 мар. 2026
Источник: github
Github: Прошло ревью
CVSS4: 2.4
CVSS3: 4.6

Описание

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

Пакеты

Наименование

openclaw

npm
Затронутые версииВерсия исправления

< 2026.2.23

2026.2.23

EPSS

Процентиль: 4%
0.00148
Низкий

2.4 Low

CVSS4

4.6 Medium

CVSS3

Дефекты

CWE-79

Связанные уязвимости

CVSS3: 4.6
nvd
5 месяцев назад

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.

EPSS

Процентиль: 4%
0.00148
Низкий

2.4 Low

CVSS4

4.6 Medium

CVSS3

Дефекты

CWE-79