Skip to main content
EPSS 0.5%top 58%

CVE-2026-26226: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in lukilabs beautiful-mermaid

0
Medium
VulnerabilityCVE-2026-26226cvecve-2026-26226cwe-79
Published: 02/13/2026 (02/13/2026, 16:35:06 UTC)
Source: CVE Database V5
Vendor/Project: lukilabs
Product: beautiful-mermaid

Description

beautiful-mermaid versions prior to 0.1.3 contain an SVG attribute injection issue that can lead to cross-site scripting (XSS) when rendering attacker-controlled Mermaid diagrams. User-controlled values from Mermaid style and classDef directives are interpolated into SVG attribute values without proper escaping, allowing crafted input to break out of an attribute context and inject arbitrary SVG elements/attributes into the rendered output. When the generated SVG is embedded in a web page, this can result in script execution in the context of the embedding origin.

CVSS v4.0

Score 5.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Affected software

Affected versions
=0<0.1.3

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/15/2026, 11:09:14 UTC

Technical Analysis

The vulnerability in beautiful-mermaid arises from improper neutralization of input during web page generation. Specifically, user-controlled values from Mermaid style and classDef directives are interpolated directly into SVG attribute values without proper escaping. This allows crafted input to break out of the attribute context and inject arbitrary SVG elements or attributes into the rendered SVG output. When this SVG is embedded in a web page, it can lead to script execution in the context of the embedding origin, constituting a cross-site scripting (XSS) vulnerability. The issue affects versions prior to 0.1.3.

Potential Impact

Successful exploitation allows an attacker to execute arbitrary scripts in the context of the embedding web page's origin. This can lead to theft of sensitive information, session hijacking, or other malicious actions permitted by script execution in the victim's browser. The vulnerability is limited to scenarios where attacker-controlled Mermaid diagrams are rendered and embedded in web pages.

Mitigation Recommendations

No official patch or fix is currently available for this vulnerability. Users should avoid rendering untrusted Mermaid diagrams with affected versions of beautiful-mermaid. Monitor the vendor's advisory channels for updates or patches addressing this issue. Applying input sanitization or escaping on Mermaid style and classDef directives before rendering may reduce risk but is not a guaranteed fix.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-02-11T20:08:07.945Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 698f5609c9e1ff5ad84b62ac

Added to database: 02/13/2026, 16:49:13 UTC

Last enriched: 07/15/2026, 11:09:14 UTC

Last updated: 09/10/2026, 19:36:53 UTC

Views: 229

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses