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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-50159— Mermaid allows CSS injection applying to sibling elements of the diagram

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-js Mermaid是mermaid-js社区开源的一款通过文本定义图表的图表绘制工具。 mermaid-js mermaid 10.9.8之前版本和11.16.1之前版本存在代码注入漏洞,该漏洞源于图表提供的类或id名称生成的兄弟组合选择器存在CSS注入,可能导致攻击者注入任意CSS到渲染页面,改变无关页面元素的外观或行为。

CVSS 5.3 · Medium EPSS 0.60% · P47

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 2

VendorProduct Version RangeStatus
mermaid-js mermaid < 10.9.8 affected
>= 11.0.0-alpha.1, < 11.16.1 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-50159

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 allows CSS injection applying to sibling elements of the diagram
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. Prior to 10.9.8 and 11.16.1, Mermaid is vulnerable to CSS injection via sibling combinator selectors generated from diagram-supplied class or id names. An attacker who can supply diagram text can inject arbitrary CSS into the rendered page, potentially altering the appearance or behavior of unrelated page elements. This issue is fixed in versions 10.9.8 and 11.16.1.
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-js mermaid 代码注入漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
mermaid-js Mermaid是mermaid-js社区开源的一款通过文本定义图表的图表绘制工具。 mermaid-js mermaid 10.9.8之前版本和11.16.1之前版本存在代码注入漏洞,该漏洞源于图表提供的类或id名称生成的兄弟组合选择器存在CSS注入,可能导致攻击者注入任意CSS到渲染页面,改变无关页面元素的外观或行为。
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 < 10.9.8 -

II. Public POCs for CVE-2026-50159

# 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-50159

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-50159 (3)

Vendor Advisories for CVE-2026-50159 (1)

Vendor Pages for CVE-2026-50159 (1)

Other References for CVE-2026-50159 (1)

Same Patch Batch · mermaid-js · 2026-08-06 · 5 CVEs total

CVE-2026-71437 6.5 MEDIUM Mermaid Architecture diagrams are vulnerable to prototype pollution
CVE-2026-71439 5.3 MEDIUM Mermaid radar diagrams are vulnerable to DoS
CVE-2026-71436 5.3 MEDIUM Mermaid XY Charts are vulnerable to an infinite loop DoS
CVE-2026-71438 2.4 LOW Mermaid configuration APIs allow prototype pollution

IV. Related Vulnerabilities

V. Comments for CVE-2026-50159

No comments yet


Leave a comment