mxGraph vulnerable to cross-site scripting in color field

mxgraph Updated 02 Oct 2025

Summary

24/05/2022
Yes i
Moderate
6.1

CVE-2019-13127: mxGraph vulnerable to cross-site scripting in color field. Affects mxgraph versions < 4.0.1. Fixed in 4.0.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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

How To Fix

Latest published version: 4.2.2 as of 23 Oct 2026

npm install mxgraph@4.2.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.0.1

This is the first release that contains the fix.

npm install mxgraph@4.0.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Share this vulnerability

Related vulnerabilities

Recent vulnerabilities recorded for mxgraph.

How To Fix

Latest published version: 4.2.2 as of 23 Oct 2026

npm install mxgraph@4.2.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.0.1

This is the first release that contains the fix.

npm install mxgraph@4.0.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback