Skip to content
OpenAdvisories
High GHSA-w32g-5hqp-gg6q

Cross-Site Scripting in mermaid

Published Sep 2, 2020 · Updated Sep 27, 2021 · Assigned by GHSA

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

Affected packages

EcosystemPackageAffectedFixedRecord
npm mermaid < 8.2.3 8.2.3 GHSA-w32g-5hqp-gg6q

References