CVE-2025-59840
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-59840 is a high-severity Cross-Site Scripting (XSS) vulnerability discovered in Vega, a visualization grammar library. The vulnerability was disclosed on November 13, 2025, affecting Vega versions prior to 6.2.0. The flaw exists in applications that attach the Vega library and a Vega.View instance to the global window while allowing user-defined Vega JSON definitions (GitHub Advisory).

Technical details

The vulnerability allows arbitrary JavaScript code execution even when using the 'safe mode' expressionInterpreter. The flaw stems from improper input sanitization that enables attackers to abuse toString calls in environments using the VEGA_DEBUG global variable. The vulnerability has received a CVSS v3.1 base score of 8.1 (High) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N, indicating network accessibility with low attack complexity and no privileges required, though user interaction is necessary (GitHub Advisory).

Impact

Successful exploitation of this vulnerability allows attackers to execute arbitrary JavaScript in the context of the application's domain. This can lead to theft of sensitive information such as authentication tokens, manipulation of data displayed to the user, or execution of unauthorized actions on behalf of the victim. The exploit compromises both confidentiality and integrity of impacted applications (GitHub Advisory).

Mitigation and workarounds

Users are advised to upgrade to Vega 6.2.0, vega-expression 6.1.0, and vega-interpreter 2.2.1 (if using AST evaluator mode) for the latest Vega line (6.x). For non-ESM environments, upgrade to vega-expression 5.2.1 or 1.2.1. As temporary workarounds, users should avoid attaching Vega View instances to global variables and prevent attaching Vega to the global window. These practices, while convenient for debugging, should not be used in production environments or situations where untrusted parties can provide Vega/Vega-lite definitions (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59840HIGH8.1
  • JavaScriptJavaScript
  • vega
NoYesNov 13, 2025
GHSA-8wj8-cfxr-9374HIGH8
  • JavaScriptJavaScript
  • aws-advanced-nodejs-wrapper
NoYesNov 13, 2025
CVE-2025-64748MEDIUM6.5
  • JavaScriptJavaScript
  • directus
NoYesNov 13, 2025
CVE-2025-64749MEDIUM4.3
  • JavaScriptJavaScript
  • @directus/api
NoYesNov 13, 2025
CVE-2025-64745LOW2.7
  • JavaScriptJavaScript
  • astro
NoYesNov 13, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management