Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59840

CVE-2025-59840: Vega Visualization Grammar RCE Vulnerability

CVE-2025-59840 is a remote code execution flaw in Vega visualization grammar that allows arbitrary JavaScript execution even in safe mode. This post explains its impact, affected versions, and mitigation steps.

Published: April 1, 2026

CVE-2025-59840 Overview

CVE-2025-59840 is an arbitrary JavaScript code execution vulnerability affecting the Vega visualization grammar library. Vega is a declarative format for creating, saving, and sharing interactive visualization designs. Applications using Vega prior to version 6.2.0 are at risk of arbitrary JavaScript code execution, even when the "safe mode" expressionInterpreter is enabled. This vulnerability can be exploited when applications attach the vega library and a vega.View instance to the global window object while also allowing user-defined Vega JSON definitions.

Critical Impact

Arbitrary JavaScript code execution bypassing safe mode protections, potentially leading to data theft, session hijacking, or further compromise of web applications and their users.

Affected Products

  • Vega versions prior to 6.2.0
  • vega-expression versions prior to 6.1.0 (6.x line) and 5.2.1 / 1.2.1 (non-ESM environments)
  • vega-interpreter versions prior to 2.2.1 (when using AST evaluator mode)

Discovery Timeline

  • 2025-11-13 - CVE CVE-2025-59840 published to NVD
  • 2025-11-14 - Last updated in NVD database

Technical Details for CVE-2025-59840

Vulnerability Analysis

This vulnerability represents a Cross-Site Scripting (XSS) variant that allows arbitrary JavaScript code execution within applications using the Vega visualization library. The vulnerability stems from improper handling of user-supplied Vega JSON definitions when combined with specific global scope configurations.

Applications are vulnerable when two conditions are met simultaneously: the application attaches the vega library and a vega.View instance to the global window object, and the application accepts user-defined Vega JSON definitions rather than exclusively using JSON from source code. Notably, this vulnerability bypasses the "safe mode" expressionInterpreter that developers may rely upon for security, creating a false sense of protection.

The attack vector is network-based and requires user interaction, such as loading a malicious visualization definition. The vulnerability primarily impacts confidentiality and integrity, as attackers can execute arbitrary JavaScript in the context of the victim's browser session.

Root Cause

The root cause lies in the exposure of internal Vega objects through global scope attachment. When the vega library and View instances are accessible via the window object, malicious Vega JSON definitions can access these objects and leverage them to execute arbitrary JavaScript code, bypassing the intended security restrictions of the expressionInterpreter safe mode.

Attack Vector

The attack exploits the network-accessible nature of web applications using Vega. An attacker crafts a malicious Vega JSON definition that, when processed by a vulnerable application, leverages the globally exposed vega objects to execute arbitrary JavaScript code. This could occur through:

  1. Direct submission of malicious visualization definitions to applications accepting user input
  2. Loading attacker-controlled visualization specifications from untrusted sources
  3. Manipulation of shared or collaborative visualization projects

The vulnerability does not require authentication and executes in the context of the victim user's session, potentially allowing access to sensitive data, session tokens, or enabling further attacks such as credential theft.

Detection Methods for CVE-2025-59840

Indicators of Compromise

  • Unusual or obfuscated expressions within Vega JSON definitions attempting to access global objects
  • Unexpected references to window.vega or window.View within visualization specifications
  • JavaScript errors or console messages indicating attempted access to restricted objects
  • Anomalous network requests originating from visualization rendering contexts

Detection Strategies

  • Review application code for patterns that attach vega or vega.View instances to the global window object
  • Audit user-submitted Vega JSON definitions for suspicious expressions or code patterns
  • Implement Content Security Policy (CSP) headers to detect and block inline script execution attempts
  • Monitor browser console logs in staging environments for unexpected global object access

Monitoring Recommendations

  • Enable logging for all user-submitted visualization definitions with content inspection
  • Implement Web Application Firewall (WAF) rules to detect potentially malicious Vega JSON patterns
  • Monitor for client-side JavaScript errors that may indicate exploitation attempts
  • Review referrer headers and origins for visualization definition submissions

How to Mitigate CVE-2025-59840

Immediate Actions Required

  • Audit applications to identify if vega or vega.View instances are attached to global variables
  • Remove global attachments of vega library and View instances from production code
  • Validate and sanitize all user-provided Vega JSON definitions before processing
  • Implement strict Content Security Policy headers to limit JavaScript execution contexts

Patch Information

Patches are available for all affected Vega components. For applications using the latest Vega line (6.x), upgrade to:

  • vega version 6.2.0 or later
  • vega-expression version 6.1.0 or later
  • vega-interpreter version 2.2.1 or later (if using AST evaluator mode)

For applications using Vega in a non-ESM environment, upgrade to:

  • vega-expression version 5.2.1 or 1.2.1 (if using AST evaluator mode)

For detailed information, refer to the GitHub Security Advisory.

Workarounds

  • Do not attach vega View instances to global variables in any environment
  • Do not attach the vega library to the global window object
  • Avoid debugging practices that expose internal objects globally in production or when handling untrusted definitions
  • Restrict Vega/Vega-Lite definitions to trusted sources only; do not process user-provided visualization specifications without thorough validation
bash
# Example: Update Vega packages using npm
npm update vega@^6.2.0 vega-expression@^6.1.0 vega-interpreter@^2.2.1

# Verify installed versions
npm list vega vega-expression vega-interpreter

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechVega

  • SeverityHIGH

  • CVSS Score8.1

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-65110: Vega Visualization DOM XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English