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

exploitDog

redhat логотип

CVE-2026-41159

Опубликовано: 29 мая 2026
Источник: redhat
CVSS3: 5.4
EPSS Низкий

Описание

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

A flaw was found in Mermaid, a JavaScript tool for creating diagrams and charts. A remote attacker could exploit this vulnerability by injecting malicious Cascading Style Sheets (CSS) through specific configuration options, such as fontFamily, themeCSS, and altFontFamily. This injected CSS can bypass the intended scoping, allowing styles to be applied to all elements on a web page, leading to page defacement. Additionally, this flaw enables the exfiltration of sensitive information from the Document Object Model (DOM) using CSS selectors.

Отчет

This Moderate flaw in Mermaid, a JavaScript diagramming tool, allows for CSS injection that bypasses intended scoping. A remote attacker could exploit this by providing a specially crafted diagram, leading to page defacement and potential exfiltration of sensitive information from the Document Object Model (DOM). This impact is considered Moderate as it requires user interaction to render the malicious content.

Меры по смягчению последствий

Upgrade to Mermaid 11.8.1 or later. As a workaround, sanitize or reject user-supplied diagram definitions before rendering, or render diagrams in a sandboxed iframe with restricted CSP to limit the impact of CSS injection.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Build of Podman Desktoprh-podman-desktop.gitFix deferred
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/code-rhel9Fix deferred

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-79
https://bugzilla.redhat.com/show_bug.cgi?id=2483294mermaid: Mermaid: Information disclosure and page defacement via CSS injection

EPSS

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

5.4 Medium

CVSS3

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

CVSS3: 5.3
ubuntu
2 месяца назад

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

CVSS3: 5.3
nvd
2 месяца назад

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

CVSS3: 5.3
debian
2 месяца назад

Mermaid is a JavaScript tool that uses Markdown-inspired text to creat ...

github
3 месяца назад

Mermaid: Improper sanitization of configuration leads to CSS injection

EPSS

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

5.4 Medium

CVSS3