CVE-2025-65110 Overview
CVE-2025-65110 is a Cross-Site Scripting (XSS) vulnerability affecting Vega, a declarative visualization grammar used for creating, saving, and sharing interactive visualization designs. The vulnerability allows for arbitrary JavaScript code execution in applications that meet specific conditions, even when "safe mode" expressionInterpreter is enabled. The flaw can lead to DOM XSS attacks, which may be stored or reflected depending on how the library is implemented.
Applications are at risk if they attach both the vega library and a vega.View instance to the global window object (similar to the Vega Editor), or have other satisfactory function gadgets in the global scope, and allow user-defined Vega JSON definitions rather than only using JSON provided through source code.
Critical Impact
Successful exploitation allows attackers to execute arbitrary JavaScript in the context of the application's domain, enabling theft of authentication tokens, manipulation of displayed data, and execution of unauthorized actions on behalf of victims.
Affected Products
- Vega v6 versions prior to vega-selections@6.1.2
- Vega v5 versions prior to vega-selections@5.6.3
- Applications using Vega with global window attachments and user-defined JSON specifications
Discovery Timeline
- 2026-01-05 - CVE-2025-65110 published to NVD
- 2026-01-08 - Last updated in NVD database
Technical Details for CVE-2025-65110
Vulnerability Analysis
This vulnerability (CWE-79) enables DOM-based Cross-Site Scripting through malicious Vega specification files. The attack surface exists in applications that expose the vega library or vega.View instances through the global window object, a common practice in development environments like the Vega Editor.
The vulnerability requires user interaction to trigger, meaning victims must be tricked into opening or processing a malicious Vega JSON specification. When exploited, attackers can execute arbitrary JavaScript within the security context of the target application's domain, bypassing same-origin policy protections.
The impact primarily affects confidentiality and integrity of impacted applications. Attackers can steal sensitive information including session tokens and authentication credentials, manipulate data displayed to users, and perform unauthorized actions on behalf of authenticated victims.
Root Cause
The root cause stems from insufficient sanitization of Vega JSON specifications when processed by applications that expose vega objects to the global scope. The vulnerability exists because the library's "safe mode" expressionInterpreter does not adequately protect against exploitation when combined with globally accessible function gadgets.
Development debugging practices that attach vega or vega.View instances to global variables or the window object create the necessary conditions for exploitation, as these exposed objects can be leveraged as gadgets to execute malicious code embedded in crafted Vega specifications.
Attack Vector
The attack is network-based and requires user interaction with the vulnerable page. An attacker crafts a malicious Vega JSON specification containing embedded JavaScript code. When a victim opens or interacts with this specification in a vulnerable application, the malicious code executes within the application's security context.
The attack flow involves:
- Attacker creates a malicious Vega JSON specification containing XSS payload
- Victim is tricked into opening the specification in a vulnerable application
- The application processes the specification with vega objects exposed globally
- Malicious JavaScript executes with full access to the application's DOM and cookies
- Attacker can exfiltrate data, hijack sessions, or perform actions as the victim
The vulnerability mechanism exploits the global exposure of vega objects. When the library or View instances are attached to window, they become accessible as function gadgets that can be invoked through carefully crafted specification payloads. For detailed technical analysis of the exploitation technique, refer to the GitHub Security Advisory.
Detection Methods for CVE-2025-65110
Indicators of Compromise
- Unexpected JavaScript execution when loading Vega visualizations
- Suspicious network requests originating from visualization rendering contexts
- Anomalous DOM modifications during Vega specification processing
- Unexplained authentication token access or exfiltration attempts
Detection Strategies
- Implement Content Security Policy (CSP) headers to detect and block inline script execution
- Monitor for suspicious Vega JSON specifications containing potential script injection patterns
- Review application code for global exposure of vega or vega.View instances to window
- Audit user-submitted Vega JSON definitions for malicious payloads before processing
Monitoring Recommendations
- Enable client-side security monitoring for XSS attack patterns
- Log and analyze Vega specification submissions from untrusted sources
- Implement real-time alerting for CSP violations in visualization rendering contexts
- Monitor for unusual JavaScript execution patterns during Vega processing
How to Mitigate CVE-2025-65110
Immediate Actions Required
- Update Vega v6 installations to vega-selections@6.1.2 (requires ESM)
- Update Vega v5 installations to vega-selections@5.6.3 (no ESM needed)
- Remove any global attachments of vega or vega.View instances to window or global variables
- Restrict user-defined Vega JSON specifications to trusted sources only
Patch Information
Patched versions are available through the official Vega repository. For Vega v6, update to vega-selections@6.1.2 which requires ESM support. For Vega v5, update to vega-selections@5.6.3 which does not require ESM. Both patches address the underlying vulnerability that enables arbitrary JavaScript execution through malicious specifications.
For additional details and patch verification, consult the GitHub Security Advisory.
Workarounds
- Remove all global attachments of vega or vega.View instances from window object
- Restrict Vega/Vega-lite definitions to only trusted, source-code-provided JSON
- Implement strict input validation and sanitization for any user-provided Vega specifications
- Deploy Content Security Policy headers to mitigate potential XSS exploitation
# Configuration example - Remove global vega exposure
# Before (vulnerable):
# window.vega = vega;
# window.view = new vega.View(...);
# After (secure):
# Use module-scoped variables instead of window attachments
# const view = new vega.View(...);
# Do not expose to global scope
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


