Skip to main content
CVE-2025-59840VulnerabilityPublished

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

Affects vegaSource GCVE Database

0
Compare
Authoritative record:CVE-2025-59840· High 8.1

Not known to be exploited · CVSS 8.1 High : upgrade to 6.2.0 soon.

Data as of 13 Nov 2026, 18:46 UTC

CVSS 3.1 base score
8.1High
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.18.1
Patch
Available – fixed in 6.2.0, 6.1.0, 2.2.1 +2
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
npmvegaAffected
  • <6.2.0
Fixed in
  • 6.2.0
npmvega-expressionAffected
  • >=6.0.0 <6.1.0
Fixed in
  • 6.1.0
npmvega-interpreterAffected
  • >=2.0.0 <2.2.1
Fixed in
  • 2.2.1
npmvega-interpreterAffected
  • <1.2.1
Fixed in
  • 1.2.1
npmvega-expressionAffected
  • <5.2.1
Fixed in
  • 5.2.1

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available and should be applied: upgrade to Vega 6.2.0, vega-expression 6.1.0, vega-interpreter 2.2.1, or the corresponding fixed versions in other branches (1.2.1, 5.2.1). If upgrading is not immediately possible, do not attach Vega or Vega View instances to global variables such as window, as this practice enables exploitation. Avoid exposing Vega globals in production environments or where untrusted Vega JSON definitions are accepted. These mitigations align with vendor guidance.

Description

A high-severity cross-site scripting (XSS) vulnerability exists in the Vega visualization library when applications expose the Vega library and View instances globally and allow user-defined Vega JSON definitions. This flaw enables arbitrary JavaScript code execution via crafted expressions abusing toString calls, even when Vega's safe mode expression interpreter is used. The vulnerability is fixed in Vega versions 6.2.0, 6.1.0, 2.2.1, 1.2.1, and 5.2.1. Workarounds include avoiding attaching Vega or Vega View instances to global variables. Exploitation requires conditions that expose the VEGA_DEBUG global and allow untrusted JSON input.

References

Community reviews

Loading reviews…