CVE-2025-59840 Details
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.
A cross-site scripting (XSS) vulnerability has been identified in Vega versions prior to 6.2.0. This issue arises in applications that attach the Vega library and a `vega.View` instance to the global `window`, similar to the Vega Editor, while also allowing user-defined Vega JSON definitions. The vulnerability exists even when the 'safe mode' expression interpreter is used, and can be exploited to execute arbitrary JavaScript code in the context of the application's domain.
Upgrade to Vega version 6.2.0, or to `vega-expression` version 6.1.0 or `vega-interpreter` version 2.2.1 if using AST evaluator mode. For non-ESM environments, upgrade to `vega-expression` version 5.2.1 or 1.2.1 if using AST evaluator mode.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Nov 13, 2025CISA-ADP
Assessed Nov 14, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vega/vega/security/advisories/GHSA-7f2v-3qq3-vvjf | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Vega | <= 6.1.2 (semver) |
CPE
Remediation
| |
| Vega-expression | All versions |
CPE
Remediation
| |
| Vega-interpreter | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 13, 2025 | New CVE Received | [email protected] |
Volerion