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.

Published: 2025-11-13 Last update: 2026-04-15 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-59840 is rated Low Risk (35.3/100): CVSS High severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-59840

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-10 0.06% 0.03% -0.03%
2 2026-01-20 0.04% 0.06% +0.01%
3 2025-11-14 0.04%

Full EPSS history (3 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-59840

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 5.2 [email protected]

Weakness enumeration for CVE-2025-59840

GitHub Security Advisory for CVE-2025-59840

GHSA-7f2v-3qq3-vvjf · Severity: high · Ecosystem: npm — Vega Cross-Site Scripting (XSS) via expressions abusing toString calls in environments using the VEGA_DEBUG global variable

OS Trackers for CVE-2025-59840

vendor priority summary link
debian not yet assigned CVE-2025-59840 not yet assigned priority: Debian including 1 source packages (vega.js), 4 status rows across 4 suites (bookworm, forky, sid, trixie): open 2, resolved 2. https://security-tracker.debian.org/tracker/CVE-2025-59840
redhat high https://access.redhat.com/security/cve/CVE-2025-59840
suse high https://www.suse.com/security/cve/CVE-2025-59840/
ubuntu medium CVE-2025-59840 medium priority: Ubuntu including 1 source packages (vega.js), 5 status rows across 5 suites (jammy, noble, plucky, questing, upstream): needs-triage 3, DNE 1, ignored 1. https://ubuntu.com/security/CVE-2025-59840

Affected software / configurations for CVE-2025-59840

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2025-59840

cvelogic Threat Intelligence