CVE-2025-59840CWE-79cross-site-scripting

CVE-2025-59840

High · published November 14, 2025

CVSS v3.1
8.1
EPSS
0%
Percentile
35.6
In the wild
Unconfirmed
What it is

⚡ A simple misconfiguration can turn your interactive visualizations into a playground for attackers! 🚨 Think of this vulnerability like leaving your front door wide open while inviting strangers to paint your living room. If you let untrusted users define the Vega `JSON`, they could easily slip in harmful JavaScript, wreaking havoc on your app! If exploited, an attacker could execute arbitrary JavaScript code in your application, potentially stealing sensitive data or taking control of users' sessions. This could lead to devastating consequences, like unauthorized access to user accounts and data breaches, all thanks to a seemingly innocent configuration!

Put simply

Think of this vulnerability like leaving your front door wide open while inviting strangers to paint your living room. If you let untrusted users define the Vega `JSON`, they could easily slip in harmful JavaScript, wreaking havoc on your app! This vulnerability arises when Vega is used in applications that attach the `vega` library and a `vega.View` instance to the global `window`, allowing user-defined `JSON` definitions. Even with 'safe mode' enabled, this setup can allow execution of malicious code.

What to do

If exploited, an attacker could execute arbitrary JavaScript code in your application, potentially stealing sensitive data or taking control of users' sessions. This could lead to devastating consequences, like unauthorized access to user accounts and data breaches, all thanks to a seemingly innocent configuration! Upgrade your Vega libraries to the latest versions: `vega` 6.2.0, `vega-expression` 6.1.0, and `vega-interpreter` 2.2.1 if you are using AST evaluator mode. Also, avoid attaching `vega` View instances to global variables or the global window in production environments. You've got this! Secure your app and keep those visualizations safe! 🛡️

The record
Technical detail
CVSS v3.1
8.1 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00424 · 35.6th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2025-11-14T01:15Z
References (1)
EPSS history
Timeline
  • 13 NOV 19:54Z
    Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable
    cvelistv5