{"id":"GHSA-8fw4-xh83-3j6q","aliases":["GHSA-8fw4-xh83-3j6q"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-Site Scripting in diagram-js","summary":"Versions of `diagram-js` prior to 3.3.1 (for 3.x) and 2.6.2 (for 2.x) are vulnerable to Cross-Site Scripting. The package fails to escape output of user-controlled input in `search-pad`, allowing attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nIf you are using diagram-js 3.x, upgrade to version 3.3.1.\nIf you are using diagram-js 2.x, upgrade to version 2.6.2.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Versions of `diagram-js` prior to 3.3.1 (for 3.x) and 2.6.2 (for 2.x) are vulnerable to Cross-Site Scripting. The package fails to escape output of user-controlled input in `search-pad`, allowing attackers to execute arbitrary JavaScript.\n\n\n## Recommendation\n\nIf you are using diagram-js 3.x, upgrade to version 3.3.1.\nIf you are using diagram-js 2.x, upgrade to version 2.6.2.","format":"markdown","source":"ghsa"}],"published":"2020-09-11T21:18:05.000Z","modified":"2021-09-28T16:58:42.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.2"}],"ecosystem":"npm","package":"diagram-js","purl":"pkg:npm/diagram-js","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.3.1"}],"ecosystem":"npm","package":"diagram-js","purl":"pkg:npm/diagram-js","source":"ghsa"}],"references":[{"url":"https://github.com/bpmn-io/diagram-js/commit/2565c40449379284a55163f290ec812db34244d1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/bpmn-io/diagram-js/commit/777fa06d70036daa9d02f3be6d0732cf4ccd8d6d","tags":["web"],"sources":["ghsa"]},{"url":"https://bpmn.io/blog/posts/2019-html-injection-vulnerabilities-fixed.html","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/bpmn-io/diagram-js","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8fw4-xh83-3j6q","url":"https://github.com/advisories/GHSA-8fw4-xh83-3j6q","licence":"CC-BY-4.0","modified":"2021-09-28T16:58:42.000Z"}],"updatedAt":"2026-11-25T22:56:44.721Z"}