{"id":"GHSA-w32g-5hqp-gg6q","aliases":[],"status":"published","title":"Cross-Site Scripting in mermaid","description":"Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input  such as `A[\"\u003cimg src=invalid onerror=alert('XSS')\u003e\u003c/img\u003e\"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.\n\n\n## Recommendation\n\nUpgrade to version 8.2.3 or later","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2020-09-02T15:41:41Z","modified":"2023-01-09T05:03:54Z","fixes":[{"ecosystem":"npm","package":"mermaid","fixed_in":["8.2.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mermaid","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.3"}]}]},{"source":"osv","ecosystem":"npm","package":"mermaid","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"8.2.3"}]}]}],"references":[{"url":"https://github.com/knsv/mermaid/issues/847","tags":["web"]},{"url":"https://www.npmjs.com/advisories/751","tags":["web"]},{"url":"https://github.com/advisories/GHSA-w32g-5hqp-gg6q"},{"url":"https://github.com/knsv/mermaid","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-w32g-5hqp-gg6q","title":"Cross-Site Scripting in mermaid","description":"Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input  such as `A[\"\u003cimg src=invalid onerror=alert('XSS')\u003e\u003c/img\u003e\"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.\n\n\n## Recommendation\n\nUpgrade to version 8.2.3 or later","status":"published","published":"2020-09-02T15:41:41Z","modified":"2023-01-09T05:03:54Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:07.581563Z"}],"osv":[{"id":"GHSA-w32g-5hqp-gg6q","title":"Cross-Site Scripting in mermaid","description":"Versions of `mermaid` prior to 8.2.3 are vulnerable to Cross-Site Scripting. If malicious input  such as `A[\"\u003cimg src=invalid onerror=alert('XSS')\u003e\u003c/img\u003e\"] ` is provided to the application, it will execute the code instead of rendering it as text due to improper output encoding.\n\n\n## Recommendation\n\nUpgrade to version 8.2.3 or later","status":"published","published":"2020-09-02T15:41:41Z","modified":"2021-09-27T13:34:07Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:58.04805Z"}]}}
