patchminder
Proof of concept · CISA assessment CVE-2026-41149

Code injectionin mermaid-js mermaid.

Published 22 May 2026 · Updated 23 May 2026 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Proof of concept public (CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks. assessment).

Severity
Medium 5.3
CVSSA severity score from 0 to 10. 9 and higher is critical. 4.0 · no login needed
Attack likelihood
Low
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 0.4% chance in 30 days · 4 Dec 2026
Fix
Available
Fixed in 10.9.6, 11.15.0
In plain words

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>.

What to do now
  • Upgrade mermaid to 10.9.6, 11.15.0 or later, whichever matches your release line.
  • Upgrade mermaid (npm) to 10.9.6, 11.15.0 or later, whichever matches your release line.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
mermaid
11.0.0-alpha.1 to before 11.15.0
11.15.0
CVE record
mermaid
before 10.9.6
10.9.6
CVE record
mermaid (npm)
11.0.0-alpha.1 to before 11.15.0
11.15.0
GitHub advisory
mermaid (npm)
before 10.9.6
10.9.6
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 17 Apr 2026
    CVE ID reserved by GitHub_M.
  2. 22 May 2026
    Published in the CVE List.
  3. 23 May 2026
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Proof of concept (CISA assessment). CISA assessment (SSVC): exploitation poc.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other mermaid vulnerabilities

Same weakness: Code injection

All CWE-94 vulnerabilities

References
Cite this page

Patchminder. CVE-2026-41149: Code injection in mermaid-js mermaid. https://patchminder.com/cve/cve-2026-41149/ (accessed 5 December 2026).