Bug 2480858 (CVE-2026-41148) - CVE-2026-41148 mermaid: Mermaid: CSS injection vulnerability allows page defacement and information disclosure
Summary: CVE-2026-41148 mermaid: Mermaid: CSS injection vulnerability allows page defa...
Keywords:
Status: NEW
Alias: CVE-2026-41148
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2489148 2489150 2489152 2489155 2489156 2489157 2489158 2489160 2489162 2489147 2489149 2489151 2489153 2489154 2489159 2489161
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-05-22 23:01 UTC by OSIDB Bzimport
Modified: 2026-06-16 12:24 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-05-22 23:01:20 UTC
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and prior, in addition to 11.0.0-alpha.1 through 11.12.0 are vulnerable to CSS injection through improper sanitization. The state diagram (and any other diagram type that routes user-controlled style strings through the createCssStyles parser) captures classDef values using an unrestricted regex that matches everything up to a newline. That value then flows unsanitized through addStyleClass() into createCssStyles() and is assigned to style.innerHTML, so a closing brace (}) in the value terminates the generated CSS selector and turns everything after it into a new CSS rule on the page. This enables page defacement, user tracking via url() callbacks, and DOM attribute exfiltration. This issue has been fixed in versions 10.9.6 and 11.15.0. If developers are unable to immediately upgrade, they can work around this issue by setting "securityLevel": "sandbox", which prevents the issue by rendering the mermaid diagram in a sandboxed <iframe>.


Note You need to log in before you can comment on or make changes to this bug.