Skip to content

Cross-Site Scripting in mermaid

High severity GitHub Reviewed Published Sep 2, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm mermaid (npm)

Affected versions

< 8.2.3

Patched versions

8.2.3

Description

Versions of mermaid prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input such as A["<img src=invalid onerror=alert('XSS')></img>"] is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.

Recommendation

Upgrade to version 8.2.3 or later

References

Reviewed Aug 31, 2020
Published to the GitHub Advisory Database Sep 2, 2020
Last updated Jan 9, 2023

Severity

High

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-w32g-5hqp-gg6q

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.