The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-25977

CVE-2025-25977: Canvg RCE Vulnerability

CVE-2025-25977 is a remote code execution vulnerability in Canvg v.4.0.2 that allows attackers to execute arbitrary code via the StyleElement class constructor. This article covers technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2025-25977 Overview

CVE-2025-25977 is a critical arbitrary code execution vulnerability affecting the canvg library version 4.0.2. The vulnerability exists in the Constructor of the StyleElement class, which can be exploited by attackers to execute arbitrary code. Canvg is a popular JavaScript library used for parsing and rendering SVG documents in web browsers and Node.js environments, making this vulnerability particularly concerning for applications that process user-supplied SVG content.

Critical Impact

Attackers can achieve remote code execution through the vulnerable StyleElement class constructor, potentially leading to complete system compromise in applications using the affected canvg version.

Affected Products

  • canvg version 4.0.2
  • Applications and services using canvg v.4.0.2 for SVG processing
  • Node.js and browser-based environments utilizing the vulnerable library

Discovery Timeline

  • 2025-03-10 - CVE-2025-25977 published to NVD
  • 2025-03-25 - Last updated in NVD database

Technical Details for CVE-2025-25977

Vulnerability Analysis

This vulnerability is classified under CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, commonly known as 'Prototype Pollution'). The flaw resides within the StyleElement class constructor in canvg v.4.0.2. When processing maliciously crafted input, the constructor fails to properly validate or sanitize data, allowing an attacker to inject and execute arbitrary code.

The network-accessible nature of this vulnerability means attackers can exploit it remotely without authentication or user interaction. Applications that accept SVG content from untrusted sources and process it using the vulnerable canvg library are at significant risk.

Root Cause

The root cause stems from insufficient input validation within the StyleElement class constructor. When the constructor processes style-related data from SVG documents, it does not adequately sanitize or restrict the input, creating an opportunity for prototype pollution or code injection attacks. This allows malicious payloads embedded in SVG content to be executed in the context of the application.

Attack Vector

The attack is network-based and can be executed without any privileges or user interaction. An attacker would craft a malicious SVG document containing specially constructed style elements. When a vulnerable application processes this SVG using canvg v.4.0.2, the payload within the StyleElement constructor is executed, granting the attacker arbitrary code execution capabilities.

The vulnerability is particularly dangerous in scenarios where:

  • Web applications allow users to upload or embed SVG content
  • Server-side applications render SVG documents using canvg
  • PDF generators or image processing services utilize canvg for SVG conversion

For technical details and discussion, see the GitHub Issue Tracker Entry.

Detection Methods for CVE-2025-25977

Indicators of Compromise

  • Presence of canvg version 4.0.2 in package.json or package-lock.json files
  • Unexpected SVG files containing complex or obfuscated style elements in application input directories
  • Anomalous process behavior or unexpected child processes spawned from Node.js or web application processes
  • Unusual network connections originating from applications that process SVG content

Detection Strategies

  • Implement dependency scanning tools to identify canvg v.4.0.2 in your software inventory
  • Deploy application-level monitoring to detect unusual code execution patterns when processing SVG content
  • Use Software Composition Analysis (SCA) tools to flag vulnerable library versions
  • Monitor for attempts to upload or process malformed SVG files with suspicious style elements

Monitoring Recommendations

  • Enable verbose logging for applications that process SVG files to capture input characteristics
  • Monitor npm/yarn audit outputs for known vulnerabilities in the canvg package
  • Implement runtime application self-protection (RASP) to detect and block exploitation attempts
  • Set up alerts for unusual system calls or process creation events from SVG processing services

How to Mitigate CVE-2025-25977

Immediate Actions Required

  • Audit your applications to identify any usage of canvg version 4.0.2
  • Update canvg to a patched version as soon as one becomes available from the maintainers
  • If upgrading is not immediately possible, restrict or disable SVG processing from untrusted sources
  • Implement strict input validation for all SVG content before processing with canvg

Patch Information

At the time of publication, users should monitor the canvg GitHub repository for security updates and patch releases. Check the project's releases page and security advisories for the latest fixed version. Update your package.json to use a patched version once available:

bash
npm update canvg

Verify the installed version does not include v.4.0.2:

bash
npm list canvg

Workarounds

  • Implement a content security policy to restrict execution contexts for SVG processing
  • Use a sandboxed environment for SVG rendering to limit the impact of potential code execution
  • Sanitize SVG content by stripping or validating style elements before passing to canvg
  • Consider using alternative SVG processing libraries until a patch is released for canvg
bash
# Example: Check for vulnerable canvg version in your project
npm list canvg | grep "4.0.2"

# Run npm audit to identify security vulnerabilities
npm audit

# If vulnerable, consider removing and finding alternatives temporarily
npm uninstall canvg

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCanvg

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.44%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-1321
  • Technical References
  • GitHub Issue Tracker Entry
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE 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