Home / vega / vega / CVE-2025-59840
CVE-2025-59840: is it exploited, and which versions of vega are affected and fixed?
CVE-2025-59840 is a cross-site scripting (XSS) vulnerability in vega. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:09 UTC). Affected: vega before 6.2.0, vega-expression from 6.0.0 before 6.1.0, vega-interpreter from 2.0.0 before 2.2.1 and 2 more (GitHub advisory GHSA-7f2v-3qq3-vvjf). Fixed in 6.2.0, 6.1.0, 2.2.1, 1.2.1 and 1 more (GitHub advisory GHSA-7f2v-3qq3-vvjf). Severity: High (8.1, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:09 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:15 UTC.
What is CVE-2025-59840?
Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable
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.
From the CVE record by GitHub_M, last updated November 14, 2025, 16:00 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| vega | vega | vega < 6.2.0 vega-expression >= 6.0.0, < 6.1.0 vega-expression < 5.2.1 vega-interpreter >= 2.0.0, < 2.2.1 vega-interpreter < 1.2.1 |
As the CVE record by GitHub_M states it, last updated November 14, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | vega | < 6.2.0 | 6.2.0 | GHSA-7f2v-3qq3-vvjf |
| npm | vega-expression | >= 6.0.0, < 6.1.0 | 6.1.0 | GHSA-7f2v-3qq3-vvjf |
| npm | vega-interpreter | >= 2.0.0, < 2.2.1 | 2.2.1 | GHSA-7f2v-3qq3-vvjf |
| npm | vega-interpreter | < 1.2.1 | 1.2.1 | GHSA-7f2v-3qq3-vvjf |
| npm | vega-expression | < 5.2.1 | 5.2.1 | GHSA-7f2v-3qq3-vvjf |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 14, 2025. Summary: Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable.
How severe is CVE-2025-59840?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 8.1 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N | GitHub_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-59840 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: partial (CISA ADP, November 14, 2025)
- EPSS
- 0.42% probability of exploitation activity in the next 30 days, percentile 38.3 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-79 Improper Neutralization of Input During Web Page Generation
Where are the vendor advisories and references?
- https://github.com/vega/vega/security/advisories/GHSA-7f2v-3qq3-vvjf x_refsource_CONFIRM
When was it published, and where is the official record?
- Reserved
- September 22, 2025
- Published
- November 13, 2025, 19:54 UTC
- CVE record updated
- November 14, 2025, 16:00 UTC by GitHub_M
- NVD
- Deferred, last modified October 19, 2026, 13:10 UTC
- Last checked
- CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:15 UTC; KEV December 3, 2026, 17:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect vega?
- Jan 5, 2026CVE-2025-66648 vega: cross-site scripting (XSS)
- Jan 5, 2026CVE-2025-65110 vega: cross-site scripting (XSS)
- Mar 27, 2025CVE-2025-27793 vega: improper Neutralization of Alternate XSS Syntax
- Mar 27, 2025CVE-2025-26619 vega: cross-site scripting (XSS)
- Feb 14, 2025CVE-2025-25304 vega: cross-site scripting (XSS)
- Mar 3, 2023CVE-2023-26486 vega: cross-site scripting (XSS)
- Mar 3, 2023CVE-2023-26487 vega: cross-site scripting (XSS)
- Dec 30, 2020CVE-2020-26296 vega: cross-site scripting (XSS)
Questions about CVE-2025-59840
Is CVE-2025-59840 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:09 UTC. FIRST's EPSS gives it a 0.42% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of vega are affected by CVE-2025-59840?
vega before 6.2.0, vega-expression from 6.0.0 before 6.1.0, vega-interpreter from 2.0.0 before 2.2.1, vega-interpreter before 1.2.1 and vega-expression before 5.2.1, per the GitHub advisory GHSA-7f2v-3qq3-vvjf. The tables above give every range the sources list.
Which version fixes CVE-2025-59840?
6.2.0, 6.1.0, 2.2.1, 1.2.1 and 5.2.1, per the GitHub advisory GHSA-7f2v-3qq3-vvjf. Check the vendor's advisory before you rely on it.
How severe is CVE-2025-59840?
High (8.1, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-59840?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.