cve.bz

CVE-2025-59840 vega vega: Cross-site Scripting

8.1 highEPSS 0.4%Fix available

High (8.1) in vega vega. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in vega 6.2.0.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 37th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-11-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-59840 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-59840?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-59840?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-59840 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
vegavega < 6.2.0
vegavega-expression >= 6.0.0, < 6.1.0
vegavega-expression < 5.2.1
vegavega-interpreter >= 2.0.0, < 2.2.1
vegavega-interpreter < 1.2.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7f2v-3qq3-vvjfnpmvega<6.2.06.2.0
GHSA-7f2v-3qq3-vvjfnpmvega-expression>=6.0.0 <6.1.06.1.0
GHSA-7f2v-3qq3-vvjfnpmvega-interpreter>=2.0.0 <2.2.12.2.1
GHSA-7f2v-3qq3-vvjfnpmvega-interpreter<1.2.11.2.1
GHSA-7f2v-3qq3-vvjfnpmvega-expression<5.2.15.2.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13vega.jsno fix listedDEBIAN-CVE-2025-59840
Debian14vega.js5.33.1+ds+~cs5.3.0-4DEBIAN-CVE-2025-59840
Ubuntu24.04:LTS, 25.10, 26.04:LTS and 1 morevega.jsno fix listedUBUNTU-CVE-2025-59840

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability affects the Vega visualization library when applications expose the Vega runtime or a vega.View instance on the global browser window, a pattern commonly introduced for debugging or interactive development.

Red Hat Product Security has rated this issue High severity, because a remote attacker can craft a malicious Vega specification that, once opened and interacted with by a user, triggers arbitrary script execution in the application’s origin.

The practical impact requires and depends on specific deployment conditions. Applications are only exposed if they (1) accept or render untrusted Vega specifications and (2) must expose Vega objects globally (such as VEGA_DEBUG, vega, or view attached to window). Applications that do not expose these global debugging gadgets or that only render trusted specifications are not affected.

Red Hat's mitigation

Do not attach vega or vega.View instances to global objects (e.g., window). Remove any VEGA_DEBUG helpers or debugging hooks from production builds.

These mitigations reduce but do not fully eliminate risk, because the underlying vulnerability exists in the expression evaluation design.

ProductPackageStateAdvisory
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch6-rhel9Not affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-operator-bundleNot affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-proxy-rhel9Not affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-rhel9-operatorNot affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/kibana6-rhel8Affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-curator5-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-59840.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON