Skip to content

mxGraph vulnerable to cross-site scripting in color field

Moderate severity GitHub Reviewed Published May 24, 2022 to the GitHub Advisory Database • Updated Oct 19, 2023

Package

npm mxgraph (npm)

Affected versions

<= 4.0.0

Patched versions

4.0.1

Description

mxGraph through 4.0.0, related to the draw.io Diagrams plugin before 8.3.14 for Confluence and other products, is vulnerable to cross-site scripting. draw.io Diagrams allows the creation and editing of draw.io-based diagrams in Confluence. Among other things, it allows to set the background color of text displayed in the diagram. The color provided by the user is notproperly sanitized, leading to HTML and JavaScript code to be displayed "as it is" to visitors of the page. This allows attackers to execute JavaScript code in the context of the visitor's browser and session and to e.g. run Confluence command under the visitor's user or attack the visitor's browser.

Proof of Concept (PoC):

  1. Create a new draw.io Diagram, add an element and edit its background color and enter some text to the element
  2. Enter the following "color": onMouseOver=alert(1) a=
  3. Save and view the resulting diagram, moving your mouse over the text

References

Published by the National Vulnerability Database Jul 1, 2019
Published to the GitHub Advisory Database May 24, 2022
Reviewed Oct 19, 2023
Last updated Oct 19, 2023

Severity

Moderate
6.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weaknesses

CVE ID

CVE-2019-13127

GHSA ID

GHSA-xm59-jvxm-cp3v

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.