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
    • 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-2024-25117

CVE-2024-25117: Dompdf Php-svg-lib RCE Vulnerability

CVE-2024-25117 is a remote code execution flaw in Dompdf Php-svg-lib that allows PHAR URL injection through font-family attributes. This post covers the technical details, affected versions, and mitigation strategies.

Published: April 1, 2026

CVE-2024-25117 Overview

CVE-2024-25117 is a critical vulnerability in php-svg-lib, a scalable vector graphics (SVG) file parsing and rendering library used primarily as a dependency in PHP projects such as Dompdf. The vulnerability exists because php-svg-lib fails to validate that the font-family CSS property doesn't contain a PHAR URL, which can lead to Remote Code Execution (RCE) on PHP versions prior to 8.0. Additionally, the library does not validate whether external references are allowed, creating multiple attack vectors.

Critical Impact

This vulnerability enables unauthenticated remote attackers to achieve code execution by injecting malicious PHAR URLs through SVG font-family attributes, potentially compromising any application using php-svg-lib as a dependency.

Affected Products

  • dompdf php-svg-lib (versions prior to 0.5.2)
  • PHP versions below 8.0 (when used with vulnerable php-svg-lib)
  • Applications using Dompdf for PDF generation with SVG support

Discovery Timeline

  • February 21, 2024 - CVE-2024-25117 published to NVD
  • February 5, 2025 - Last updated in NVD database

Technical Details for CVE-2024-25117

Vulnerability Analysis

The vulnerability resides in how php-svg-lib parses CSS style attributes within SVG files. Specifically, the Style::fromAttributes() and Style::parseCssStyle() functions fail to sanitize or validate the font-family property for malicious content. An attacker can craft an SVG file containing a font-family attribute that references a PHAR (PHP Archive) URL instead of a legitimate font name.

When this unsanitized font name is passed to downstream libraries or processed by the PHP interpreter, the PHAR stream wrapper can be triggered, leading to deserialization of attacker-controlled data. On PHP versions below 8.0, this can result in arbitrary code execution through PHP object injection attacks via PHAR deserialization.

The library has existing validation in Style::fromStyleSheets() that could prevent this attack, but this same validation was not applied consistently to the Style::fromAttributes() and Style::parseCssStyle() methods, creating an inconsistent security boundary.

Root Cause

The root cause is a failure to implement consistent input validation across all entry points that process the font-family CSS property. While external reference checks exist in some code paths, the Style::fromAttributes() and Style::parseCssStyle() functions bypass these security controls, allowing PHAR URLs and other potentially dangerous external references to be processed without restriction. This inconsistency in validation logic, combined with PHP's automatic PHAR stream wrapper handling, creates the exploitable condition.

Attack Vector

The attack leverages network-accessible endpoints that process SVG content. An attacker can submit a maliciously crafted SVG file to any application endpoint that uses php-svg-lib for SVG parsing (commonly through Dompdf for PDF generation). The attack requires no authentication or user interaction, making it particularly dangerous for applications that accept user-uploaded SVG files or generate PDFs from user-supplied content.

The exploitation flow involves:

  1. Crafting an SVG file with a malicious font-family attribute containing a PHAR URL
  2. Uploading or submitting the SVG to a vulnerable application
  3. When php-svg-lib parses the SVG, the malicious font-family value is extracted without sanitization
  4. The PHAR URL triggers PHP's stream wrapper, causing deserialization of attacker-controlled objects
  5. Through a carefully crafted POP chain, arbitrary code execution is achieved

Since no verified proof-of-concept code is available, readers should consult the GitHub Security Advisory for detailed technical information about the vulnerability mechanism.

Detection Methods for CVE-2024-25117

Indicators of Compromise

  • SVG files containing font-family attributes with phar:// protocol references
  • Unusual file access patterns to .phar files on the web server
  • PHP errors related to PHAR deserialization or stream wrapper issues in application logs
  • Unexpected outbound network connections following SVG processing operations

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SVG uploads containing phar:// strings in any attribute
  • Monitor application logs for PHP deserialization errors or PHAR-related warnings
  • Use static analysis tools to identify code paths that process SVG content without proper input validation
  • Deploy endpoint detection solutions capable of identifying suspicious PHP process behavior following file upload events

Monitoring Recommendations

  • Enable verbose logging for all SVG processing and PDF generation operations
  • Set up alerts for any file system access to PHAR archives from web application processes
  • Monitor for creation of unexpected PHP files or modifications to existing application code
  • Implement file integrity monitoring on critical application directories

How to Mitigate CVE-2024-25117

Immediate Actions Required

  • Upgrade php-svg-lib to version 0.5.2 or later immediately
  • Audit all applications using Dompdf or php-svg-lib as dependencies for exposure
  • Implement server-side validation to reject SVG files containing phar:// URLs before processing
  • Consider upgrading PHP to version 8.0 or later, which includes protections against PHAR deserialization attacks

Patch Information

The vulnerability has been fixed in php-svg-lib version 0.5.2. The fix implements proper validation of the font-family attribute to prevent PHAR URLs and external references from being processed. Security patches are available through the following commits:

  • Commit 732faa9
  • Commit 8ffcc41

For detailed information about the security fix, see the GitHub Security Advisory.

Workarounds

  • Implement pre-processing validation to strip or reject SVG files containing suspicious font-family values
  • Disable PHAR stream wrapper in PHP configuration if not required by your application
  • Restrict file upload functionality to prevent SVG files from being processed until patching is complete
  • Apply additional validation in consuming applications to double-check fontName values received from php-svg-lib
bash
# Disable PHAR stream wrapper in php.ini (temporary mitigation)
# Add the following to your PHP configuration:
# Note: This may break applications that legitimately use PHAR archives

# In php.ini:
# phar.readonly = 1
# 
# Or use stream_wrapper_unregister in application bootstrap:
# stream_wrapper_unregister('phar');

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechPhp Svg Lib

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.17%

  • 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-73

  • CWE-610
  • Vendor Resources
  • GitHub Commit Details

  • GitHub Commit Details

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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