Bug 2480864 (CVE-2026-41149)

Summary: CVE-2026-41149 mermaid: Mermaid: HTML injection via classDef directive in state diagrams
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: cdrage, jkoehler, lphiri, rushinde
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Mermaid, a JavaScript tool for creating diagrams and charts. A remote attacker could exploit this vulnerability by injecting malicious HTML through the `classDef` directive in Mermaid state diagrams. This allows for Document Object Model (DOM) injection, which escapes the Scalable Vector Graphics (SVG) context. While `<script>` tags are stripped, preventing Cross-Site Scripting (XSS), this could lead to HTML injection, potentially altering the appearance or content of a web page.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2489251, 2489252, 2489254, 2489255, 2489257, 2489258, 2489261, 2489250, 2489253, 2489256, 2489259, 2489260, 2489262, 2489263, 2489264, 2489265    
Bug Blocks:    

Description OSIDB Bzimport 2026-05-22 23:01:57 UTC
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the default configuration. Specifically, the classDef directive in Mermaid state diagrams permits DOM injection that escapes the SVG context. However, <script> tags are stripped, which prevents cross-site scripting (XSS). 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>.