Skip to content

CVE-2025-59840 Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable

HighCVSS 8.1 EPSS 0.42%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. In Vega prior to version 6.2.0, applications meeting 2 conditions are at risk of arbitrary JavaScript code execution, even if "safe mode" expressionInterpreter is used. They are vulnerable if they use vega in an application that attaches vega library and a vega.View instance similar to the Vega Editor to the global window and if they allow user-defined Vega JSON definitions (vs JSON that was is only provided through source code). Patches are available in the following Vega applications. If using the latest Vega line (6.x), upgrade to vega 6.2.0 / vega-expression 6.1.0 / vega-interpreter 2.2.1 (if using AST evaluator mode). If using Vega in a non-ESM environment, upgrade to vega-expression 5.2.1 / 1.2.1 (if using AST evaluator mode). Some workarounds are available. Do not attach vega View instances to global variables, and do not attach vega to the global window. These practices of attaching the vega library and View instances may be convenient for debugging, but should not be used in production or in any situation where vega/vega-lite definitions could be provided by untrusted parties.

Upgrade path

11 packages: 4 fixed, 6 with no fix yet.

PackageAffectedFixed inStatus
debian/vega.js(Debian 12) = 5.22.1+ds+~3.1.0-4; = 5.25.0+ds+~cs5.3.0-1; = 5.25.0+ds+~cs5.3.0-2; = 5.25.0+ds+~cs5.3.0-3 +10 more No fix listed No fix yet
debian/vega.js(Debian 13) = 5.28.0+ds+~cs5.3.0-1; = 5.28.0+ds+~cs5.3.0-2; = 5.28.0+ds+~cs5.3.0-3; = 5.33.1+ds+~cs5.3.0-1 +4 more No fix listed No fix yet
redhat/openshift-logging/kibana6-rhel8(Red Hat logging 5) All versions No fix listed No fix yet
ubuntu/vega.js(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/vega.js(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/vega.js(Ubuntu 26.10) All versions No fix listed No fix yet
debian/vega.js(Debian 14) < 5.33.1+ds+~cs5.3.0-4; = 5.28.0+ds+~cs5.3.0-1; = 5.28.0+ds+~cs5.3.0-2; = 5.28.0+ds+~cs5.3.0-3 +3 more 5.33.1+ds+~cs5.3.0-4 Fixed
npm vega(npm) < 6.2.0 6.2.0 Fixed
npm vega-expression(npm) < 5.2.1; >= 6.0.0, < 6.1.0 5.2.1, 6.1.0 Fixed
npm vega-interpreter(npm) < 1.2.1; >= 2.0.0, < 2.2.1 1.2.1, 2.2.1 Fixed
vega = vega-expression < 5.2.1; = vega-expression >= 6.0.0, < 6.1.0; = vega-interpreter < 1.2.1; = vega-interpreter >= 2.0.0, < 2.2.1 +1 more No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/vega.js(Debian:12) All versions No fix listed
debian/vega.js(Debian:12) = 5.22.1+ds+~3.1.0-4 No fix listed
debian/vega.js(Debian:12) = 5.25.0+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:12) = 5.25.0+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:12) = 5.25.0+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:12) = 5.25.0+ds+~cs5.3.0-4 No fix listed
debian/vega.js(Debian:12) = 5.25.0+ds+~cs5.3.0-5 No fix listed
debian/vega.js(Debian:12) = 5.28.0+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:12) = 5.28.0+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:12) = 5.28.0+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:12) = 5.33.1+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:12) = 5.33.1+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:12) = 5.33.1+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:12) = 5.33.1+ds+~cs5.3.0-4 No fix listed
debian/vega.js(Debian:13) All versions No fix listed
debian/vega.js(Debian:13) = 5.28.0+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:13) = 5.28.0+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:13) = 5.28.0+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:13) = 5.33.1+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:13) = 5.33.1+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:13) = 5.33.1+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:13) = 5.33.1+ds+~cs5.3.0-4 No fix listed
debian/vega.js(Debian:14) < 5.33.1+ds+~cs5.3.0-4 5.33.1+ds+~cs5.3.0-4
debian/vega.js(Debian:14) = 5.28.0+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:14) = 5.28.0+ds+~cs5.3.0-2 No fix listed
Show 18 more
ProductAffected versionsFixed in
debian/vega.js(Debian:14) = 5.28.0+ds+~cs5.3.0-3 No fix listed
debian/vega.js(Debian:14) = 5.33.1+ds+~cs5.3.0-1 No fix listed
debian/vega.js(Debian:14) = 5.33.1+ds+~cs5.3.0-2 No fix listed
debian/vega.js(Debian:14) = 5.33.1+ds+~cs5.3.0-3 No fix listed
npm vega-expression(npm) >= 6.0.0, < 6.1.0 6.1.0
npm vega-interpreter(npm) >= 2.0.0, < 2.2.1 2.2.1
npm vega-interpreter(npm) < 1.2.1 1.2.1
npm vega-expression(npm) < 5.2.1 5.2.1
npm vega(npm) < 6.2.0 6.2.0
vega = vega < 6.2.0 No fix listed
vega = vega-expression >= 6.0.0, < 6.1.0 No fix listed
vega = vega-expression < 5.2.1 No fix listed
vega = vega-interpreter >= 2.0.0, < 2.2.1 No fix listed
vega = vega-interpreter < 1.2.1 No fix listed
redhat/openshift-logging/kibana6-rhel8(Red Hat:logging:5) All versions No fix listed
ubuntu/vega.js(Ubuntu:24.04) All versions No fix listed
ubuntu/vega.js(Ubuntu:26.04) All versions No fix listed
ubuntu/vega.js(Ubuntu:26.10) All versions No fix listed

References