GHSA-w32g-5hqp-gg6q

Suggest an improvement
Source
https://github.com/advisories/GHSA-w32g-5hqp-gg6q
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-w32g-5hqp-gg6q/GHSA-w32g-5hqp-gg6q.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w32g-5hqp-gg6q
Published
2020-09-02T15:41:41Z
Modified
2021-09-27T13:34:07Z
Summary
Cross-Site Scripting in mermaid
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:34:30Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / mermaid

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
8.2.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-w32g-5hqp-gg6q/GHSA-w32g-5hqp-gg6q.json"