GHSA-j8r2-2x94-2q67 Cross-Site Scripting in diagram-js-direct-editing
Attackers can execute arbitrary JavaScript in victims' browsers via unsanitized clipboard input in diagram-js-direct-editing.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-j8r2-2x94-2q67?
GHSA-j8r2-2x94-2q67 is a cross-site scripting vulnerability in diagram-js-direct-editing, published on 11 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Versions of diagram-js-direct-editing prior to 1.4.3 are vulnerable to Cross-Site Scripting. The package fails to sanitize input from the clipboard, allowing attackers to execute arbitrary JavaScript in the victim's browser.
Recommendation
Upgrade to version 1.4.3 or later.
Which versions are affected by GHSA-j8r2-2x94-2q67?
2 open source packages ship an affected version, including diagram-js-direct-editing.
| Package | Affected | Fixed in |
|---|---|---|
diagram-js-direct-editing npm | All versions | 1.4.3 |
diagram-js-direct-editing npm | All versions | 1.4.3 |
How do I fix GHSA-j8r2-2x94-2q67?
Upgrade diagram-js-direct-editing to 1.4.3 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is GHSA-j8r2-2x94-2q67 being exploited?
There is no known exploitation of GHSA-j8r2-2x94-2q67 in the wild and no public exploit code.