# GHSA-8fw4-xh83-3j6q: Cross-Site Scripting in diagram-js

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-11T21:18:05.000Z
- Modified: 2021-09-28T16:58:42.000Z
- Weaknesses: CWE-79

## Description

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.


## Recommendation

If you are using diagram-js 3.x, upgrade to version 3.3.1.
If you are using diagram-js 2.x, upgrade to version 2.6.2.

(As written by GitHub Advisory Database.)

## Affected

- diagram-js (npm): before 2.6.2; from 3.0.0 before 3.3.1

## References

- <https://github.com/bpmn-io/diagram-js/commit/2565c40449379284a55163f290ec812db34244d1> (web)
- <https://github.com/bpmn-io/diagram-js/commit/777fa06d70036daa9d02f3be6d0732cf4ccd8d6d> (web)
- <https://bpmn.io/blog/posts/2019-html-injection-vulnerabilities-fixed.html> (web)
- <https://github.com/bpmn-io/diagram-js> (package)

## Sources

- GitHub Advisory Database: [GHSA-8fw4-xh83-3j6q](https://github.com/advisories/GHSA-8fw4-xh83-3j6q), CC-BY-4.0, modified 2021-09-28

---

Page: https://cve.day/GHSA-8fw4-xh83-3j6q · Whole record: https://cve.day/GHSA-8fw4-xh83-3j6q.json · Rebuilt by cve.day 2026-11-25T22:56:44.721Z
