Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global
Affects vegaSource GCVE Database
Not known to be exploited · CVSS 8.1 High : upgrade to 6.2.0 soon.
Data as of 13 Nov 2026, 18:46 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 8.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:NExploitation evidence
Disclosed: evidence found.
CVE published 13 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
| npmvega | Affected
| Fixed in
|
| npmvega-expression | Affected
| Fixed in
|
| npmvega-interpreter | Affected
| Fixed in
|
| npmvega-interpreter | Affected
| Fixed in
|
| npmvega-expression | Affected
| Fixed in
|
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
- github.com/vega/vega/security/advisories/GHSA-7f2v-3qq3-vvjf (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-59840 (opens in a new tab)
- github.com/vega/editor/blob/e102355589d23cdd0dbfd607a2cc5f9c5b7a4c55/src/components/renderer/renderer.tsx (opens in a new tab)
- github.com/vega/editor/blob/e102355589d23cdd0dbfd607a2cc5f9c5b7a4c55/src/index.tsx (opens in a new tab)
- github.com/vega/vega (opens in a new tab)
- vega.github.io/editor/ (opens in a new tab)
- vega.github.io/vega/usage/interpreter (opens in a new tab)