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

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
mermaid-js mermaid
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Mermaid是mermaid-js开源的一个应用软件。使用文本和代码创建图表和可视化。 Mermaid 10.9.5及之前版本和11.0.0-alpha.1版本至11.14.0版本存在安全漏洞,该漏洞源于默认配置下的HTML注入,可能导致DOM注入。

AI Predicted 6.1 Difficulty: Easy EPSS 0.52% · P42

Possible ATT&CK Techniques 1 AI

T1189 · Drive-by Compromise

Affected Version Matrix 2

VendorProduct Version RangeStatus
mermaid-js mermaid >= 11.0.0-alpha.1, < 11.15.0 affected
< 10.9.6 affected
Get alerts for future matching vulnerabilities Log 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: CVE Program / CVE List V5
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: CVE Program / CVE List V5
CVSS Information
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L
Source: CVE Program / CVE List V5
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: CVE Program / CVE List V5
Vulnerability Title
Mermaid 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Mermaid是mermaid-js开源的一个应用软件。使用文本和代码创建图表和可视化。 Mermaid 10.9.5及之前版本和11.0.0-alpha.1版本至11.14.0版本存在安全漏洞,该漏洞源于默认配置下的HTML注入,可能导致DOM注入。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
mermaid-js mermaid >= 11.0.0-alpha.1, < 11.15.0 -

II. Public POCs for CVE-2026-41149

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

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