Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CVE Vulnerability Details :
CVE-2026-41159
PUBLISHED
More InfoOfficial Page
Assigner-GitHub_M
Assigner Org ID-a0819718-46f1-4df5-94e2-005712e83aaa
View Known Exploited Vulnerability (KEV) details
Published At-29 May, 2026 | 13:53
Updated At-29 May, 2026 | 13:53
Rejected At-
▼CVE Numbering Authority (CNA)
Mermaid: Improper sanitization of configuration leads to CSS injection

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

Affected Products
Vendor
mermaid-js
Product
mermaid
Versions
Affected
  • >= 11.0.0-alpha.1, < 11.15.0
  • < 10.9.6
Problem Types
TypeCWE IDDescription
CWECWE-94CWE-94: Improper Control of Generation of Code ('Code Injection')
Type: CWE
CWE ID: CWE-94
Description: CWE-94: Improper Control of Generation of Code ('Code Injection')
Metrics
VersionBase scoreBase severityVector
4.05.3MEDIUM
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
Version: 4.0
Base score: 5.3
Base severity: MEDIUM
Vector:
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
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://github.com/mermaid-js/mermaid/security/advisories/GHSA-87f9-hvmw-gh4p
x_refsource_CONFIRM
https://github.com/mermaid-js/mermaid/commit/64769738d5b59211e1decb471ffbaca8afec51aahttps://github.com/mermaid-js/mermaid/commit/a9d9f0d8eb790349121508688cd338253fd80d76
x_refsource_MISC
https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.15.0
x_refsource_MISC
https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6
x_refsource_MISC
Hyperlink: https://github.com/mermaid-js/mermaid/security/advisories/GHSA-87f9-hvmw-gh4p
Resource:
x_refsource_CONFIRM
Hyperlink: https://github.com/mermaid-js/mermaid/commit/64769738d5b59211e1decb471ffbaca8afec51aahttps://github.com/mermaid-js/mermaid/commit/a9d9f0d8eb790349121508688cd338253fd80d76
Resource:
x_refsource_MISC
Hyperlink: https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.15.0
Resource:
x_refsource_MISC
Hyperlink: https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6
Resource:
x_refsource_MISC
Details not found