Skip to content
Fencer Vulns
high 8.1

CVE-2025-59840 json

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

published 2025-11-13 11 mo ago modified 2026-10-19 21 d ago also EUVD-2025-175359 , GHSA-7f2v-3qq3-vvjf

cvss
8.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 36%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm vega 6.2.0
  • npm vega-expression 5.2.1, 6.1.0
  • npm vega-interpreter 1.2.1, 2.2.1
  • vega_project vega 5.33.1, 6.20
  • vega_project vega-expression 5.2.1, 6.1.0
  • vega_project vega-interpreter 1.2.1, 2.2.1
  • vega.js Debian 14 5.33.1+ds+~cs5.3.0-4

debian advisories DEBIAN-CVE-2025-59840

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-59840 updated cvss 8.1

vega: vega-expression: vega-interpreter: Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable

  • Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/kibana6-rhel8
    affected: workaround, no fix available
  • Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/elasticsearch6-rhel9, openshift-logging/logging-curator5-rhel9, openshift-logging/elasticsearch-proxy-rhel9, openshift-logging/elasticsearch-rhel9-operator, openshift-logging/elasticsearch-operator-bundle
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
11 mo ago

Exploit prediction

0.42% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHub 3.1 8.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Affected packages

ecosystem package affected fixed in
npm vega
<6.2.0
6.2.0
npm vega-expression
>=6.0.0, <6.1.0
<5.2.1
6.1.0
5.2.1
npm vega-interpreter
>=2.0.0, <2.2.1
<1.2.1
2.2.1
1.2.1

Affected products

  • vega vega

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.