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
    • 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-2020-13756

CVE-2020-13756: Sabberworm PHP CSS Parser RCE Vulnerability

CVE-2020-13756 is a remote code execution flaw in Sabberworm PHP CSS Parser that allows attackers to execute arbitrary code via eval. This article covers technical details, affected versions, impact, and mitigation.

Published: March 4, 2026

CVE-2020-13756 Overview

CVE-2020-13756 is a critical code injection vulnerability in Sabberworm PHP CSS Parser before version 8.3.1. The vulnerability exists because the library calls eval() on uncontrolled data, potentially leading to remote code execution (RCE) when an attacker can influence input to the allSelectors() or getSelectorsBySpecificity() functions.

Critical Impact

Attackers can achieve remote code execution by injecting malicious PHP code through CSS selector specificity parameters, enabling complete server compromise.

Affected Products

  • Sabberworm PHP CSS Parser versions prior to 8.3.1
  • Applications using the vulnerable allSelectors() function with user-controlled input
  • Applications using the vulnerable getSelectorsBySpecificity() function with user-controlled input

Discovery Timeline

  • 2020-06-03 - CVE-2020-13756 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2020-13756

Vulnerability Analysis

This vulnerability represents a classic Code Injection flaw (CWE-94) resulting from the unsafe use of PHP's eval() function. The vulnerable code constructs a comparison string dynamically using user-supplied specificity search parameters and then passes this string directly to eval(). When an attacker controls the input to getSelectorsBySpecificity() or allSelectors(), they can inject arbitrary PHP code that will be executed on the server.

The dangerous pattern involves constructing a string like $bRes = {$specificity} {$userInput}; and executing it with eval(). An attacker can escape the intended comparison logic and inject additional PHP statements, such as system commands or file operations.

Root Cause

The root cause is the use of eval() on dynamically constructed strings that include user-controllable data. The original implementation in CSSBlockList.php built a comparison expression string by concatenating the selector's specificity value with the user-provided $sSpecificitySearch parameter, then executed it via eval(). This approach inherently trusts user input to be a safe comparison operator and value, which is a fundamental security violation.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker who can influence the specificity search parameter passed to getSelectorsBySpecificity() or allSelectors() can inject malicious PHP code. For example, if an application allows users to specify CSS selector filtering criteria that gets passed to these functions, the attacker can craft a payload that breaks out of the intended comparison and executes arbitrary code.

The vulnerable code pattern before the patch:

php
// VULNERABLE CODE - Before patch (lib/Sabberworm/CSS/CSSList/CSSBlockList.php)
// Source: https://github.com/sabberworm/PHP-CSS-Parser/commit/2ebf59e8bfbf6cfc1653a5f0ed743b95062c62a4

 				if ($sSpecificitySearch === null) {
 					$aResult[] = $oSelector;
 				} else {
-					$sComparison = "\$bRes = {$oSelector->getSpecificity()} $sSpecificitySearch;";
-					eval($sComparison);
-					if ($bRes) {

The security patch replaces the dangerous eval() call with a safe switch-based comparison:

php
// PATCHED CODE - After fix (lib/Sabberworm/CSS/CSSList/CSSBlockList.php)
// Source: https://github.com/sabberworm/PHP-CSS-Parser/commit/2ebf59e8bfbf6cfc1653a5f0ed743b95062c62a4

+					$sComparator = '===';
+					$aSpecificitySearch = explode(' ', $sSpecificitySearch);
+					$iTargetSpecificity = $aSpecificitySearch[0];
+					if(count($aSpecificitySearch) > 1) {
+						$sComparator = $aSpecificitySearch[0];
+						$iTargetSpecificity = $aSpecificitySearch[1];
+					}
+					$iTargetSpecificity = (int)$iTargetSpecificity;
+					$iSelectorSpecificity = $oSelector->getSpecificity();
+					$bMatches = false;
+					switch($sComparator) {
+						case '<=':
+							$bMatches = $iSelectorSpecificity <= $iTargetSpecificity;
+						break;
+						case '<':
+							$bMatches = $iSelectorSpecificity < $iTargetSpecificity;
+						break;
+						case '>=':
+							$bMatches = $iSelectorSpecificity >= $iTargetSpecificity;
+						break;
+						case '>':
+							$bMatches = $iSelectorSpecificity > $iTargetSpecificity;
+						break;
+						default:

Detection Methods for CVE-2020-13756

Indicators of Compromise

  • Unusual PHP process spawning or command execution from web server processes
  • Web server logs showing requests with unusual CSS-related parameters containing PHP code fragments
  • File system modifications or new file creation by web application processes
  • Outbound network connections initiated by web server processes to unexpected destinations

Detection Strategies

  • Monitor application logs for requests containing PHP code patterns in CSS parser-related endpoints
  • Implement web application firewall (WAF) rules to detect code injection attempts in specificity parameters
  • Use static analysis tools to identify applications using vulnerable versions of Sabberworm PHP CSS Parser
  • Deploy runtime application self-protection (RASP) to detect eval() execution with malicious payloads

Monitoring Recommendations

  • Enable verbose logging for PHP applications using CSS parsing functionality
  • Monitor for unexpected child processes spawned by web server workers
  • Implement file integrity monitoring on web application directories
  • Set up alerts for network anomalies originating from web application servers

How to Mitigate CVE-2020-13756

Immediate Actions Required

  • Upgrade Sabberworm PHP CSS Parser to version 8.3.1 or later immediately
  • Audit all code paths that pass user input to getSelectorsBySpecificity() or allSelectors() functions
  • Implement input validation on any parameters that could reach CSS parsing functions
  • Review application dependencies using composer audit or similar tools to identify vulnerable versions

Patch Information

The vulnerability is fixed in Sabberworm PHP CSS Parser version 8.3.1. The patch removes the dangerous eval() call and replaces it with a safe whitelist-based comparison using a switch statement. This ensures that only valid comparison operators (<=, <, >=, >, ===) are processed, and the specificity value is properly cast to an integer before comparison.

Update via Composer:

bash
composer require sabberworm/php-css-parser:^8.3.1

For additional details, see the GitHub Release 8.3.1 and the security patch commit.

Workarounds

  • If upgrading is not immediately possible, avoid passing user-controlled input to getSelectorsBySpecificity() or allSelectors() functions
  • Implement strict input validation to only allow numeric values and valid comparison operators in specificity search parameters
  • Consider temporarily removing or disabling functionality that relies on these vulnerable functions until patching is complete
  • Deploy a web application firewall (WAF) with rules to block requests containing PHP code patterns in CSS-related parameters
bash
# Check installed version of php-css-parser
composer show sabberworm/php-css-parser | grep versions

# Update to patched version
composer require "sabberworm/php-css-parser:>=8.3.1"

# Verify the update
composer show sabberworm/php-css-parser

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechSabberworm Php Css Parser

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability21.41%

  • 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-94
  • Technical References
  • Packet Storm Code Injection

  • Full Disclosure Announcement

  • GitHub Release 8.3.1

  • Debian LTS Security Notice
  • Vendor Resources
  • GitHub Commit Update
  • Latest CVEs
  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability

  • CVE-2026-40259: SiYuan Auth Bypass Vulnerability

  • CVE-2026-40255: AdonisJS HTTP Server CSRF 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