Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2026-41149— Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection

AI Predicted 6.1 Difficulty: Easy EPSS 0.04% · P14

Possible ATT&CK Techniques 1AI

T1189 · Drive-by Compromise

Affected Version Matrix 2

VendorProductVersion RangeStatus
mermaid-jsmermaid>= 11.0.0-alpha.1, < 11.15.0affected
< 10.9.6affected
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-41149

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection
Source: NVD (National Vulnerability Database)
Vulnerability Description
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>.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: NVD (National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
mermaid-jsmermaid >= 11.0.0-alpha.1, < 11.15.0 -

II. Public POCs for CVE-2026-41149

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-41149

登录查看更多情报信息。

Patches & Fixes for CVE-2026-41149 (2)

Vendor Advisories for CVE-2026-41149 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-41149

No comments yet


Leave a comment