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-2020-15148

CVE-2020-15148: Yiiframework Yii 2 RCE Vulnerability

CVE-2020-15148 is a remote code execution vulnerability in Yiiframework Yii 2 that allows attackers to execute arbitrary code through unsafe unserialize() calls. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-15148 Overview

CVE-2020-15148 is a critical remote code execution vulnerability affecting Yii 2 (yiisoft/yii2) before version 2.0.38. The vulnerability stems from insecure deserialization, allowing attackers to execute arbitrary code when the application calls unserialize() on arbitrary user input. This type of object injection vulnerability is particularly dangerous in PHP applications, as it can lead to complete system compromise when exploited.

Critical Impact

Remote attackers can achieve arbitrary code execution on vulnerable Yii 2 applications that deserialize untrusted user input, potentially leading to complete server compromise, data theft, and lateral movement within the network.

Affected Products

  • Yiiframework Yii versions prior to 2.0.38
  • Applications using yiisoft/yii2 that call unserialize() on user-controlled input
  • PHP applications built on vulnerable Yii 2 framework versions

Discovery Timeline

  • 2020-09-15 - CVE-2020-15148 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-15148

Vulnerability Analysis

This vulnerability is classified as CWE-502 (Deserialization of Untrusted Data). The core issue lies in the Yii 2 framework's handling of serialized PHP objects. When an application built on Yii 2 processes user-supplied serialized data through PHP's unserialize() function, an attacker can craft malicious serialized payloads that, upon deserialization, trigger dangerous "magic methods" such as __wakeup() or __destruct(). These methods can then execute arbitrary code in the context of the application.

The attack requires no authentication and can be executed remotely over the network. The scope of impact extends beyond the vulnerable component, potentially affecting the confidentiality, integrity, and availability of the entire system.

Root Cause

The root cause is the absence of proper safeguards in certain Yii 2 framework classes against unsafe deserialization. Specifically, classes like BatchQueryResult lacked a __wakeup() method that would prevent their instantiation through deserialization. Without explicit protection, PHP's native deserialization mechanism will reconstruct objects from serialized strings, potentially executing code through object property injection chains (also known as POP chains or gadget chains).

Attack Vector

The attack is conducted over the network and requires an application that:

  1. Uses a vulnerable version of Yii 2 (prior to 2.0.38)
  2. Calls unserialize() on data that can be influenced by user input

An attacker crafts a specially serialized PHP object containing a malicious payload. When this string is passed to unserialize(), the PHP engine reconstructs the object and any associated magic methods are invoked, leading to code execution. The exploit requires no user interaction or prior authentication.

php
// Security patch in framework/db/BatchQueryResult.php
// Source: https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99
 
        return null;
    }

    /**
     * Unserialization is disabled to prevent remote code execution in case application
     * calls unserialize() on user input containing specially crafted string.
     * @see CVE-2020-15148
     * @since 2.0.38
     */
    public function __wakeup()
    {
        throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__);
    }
}

Source: GitHub Commit Update

Detection Methods for CVE-2020-15148

Indicators of Compromise

  • Unusual HTTP requests containing base64-encoded or URL-encoded serialized PHP objects (strings starting with O: or a:)
  • Web application logs showing unexpected errors related to object instantiation or magic method execution
  • Anomalous process spawning from web server processes (e.g., php-fpm, apache2, or nginx workers)
  • Unexpected file system modifications or new files created in web-accessible directories

Detection Strategies

  • Deploy web application firewall (WAF) rules to detect and block serialized PHP object patterns in request parameters, cookies, and POST data
  • Implement runtime application self-protection (RASP) to monitor unserialize() calls and block suspicious payloads
  • Use SentinelOne's behavioral AI to detect post-exploitation activities such as reverse shells or unauthorized process execution
  • Perform code audits to identify all instances where unserialize() is called on user-controllable data

Monitoring Recommendations

  • Enable detailed application logging for all deserialization operations and monitor for exceptions
  • Set up alerts for unusual outbound network connections from web application servers
  • Monitor for changes to framework files or unexpected Composer package modifications
  • Implement file integrity monitoring on critical application directories

How to Mitigate CVE-2020-15148

Immediate Actions Required

  • Upgrade Yii 2 framework to version 2.0.38 or later immediately
  • Audit application code to identify all uses of unserialize() on user-controlled input
  • Replace unserialize() with safer alternatives like json_decode() where possible
  • If upgrading is not immediately possible, apply the workaround from the security advisory

Patch Information

The vulnerability is fixed in Yii 2 version 2.0.38. The patch adds a __wakeup() method to affected classes that throws a BadMethodCallException when deserialization is attempted, effectively preventing the exploitation of these classes as gadgets in POP chains. Organizations should update their Composer dependencies to pull the patched version.

For detailed patch information, refer to the GitHub Security Advisory GHSA-699q and the GitHub Commit Update.

Workarounds

  • Avoid calling unserialize() on any user-supplied or externally-sourced data
  • Use PHP's allowed_classes option with unserialize() to restrict which classes can be instantiated: unserialize($data, ['allowed_classes' => false])
  • Implement input validation to reject data that appears to contain serialized PHP objects
  • Consider using HMAC-based integrity verification for any serialized data that must be stored client-side
bash
# Update Yii 2 framework via Composer
composer require "yiisoft/yii2:^2.0.38"

# Verify the installed version
composer show yiisoft/yii2 | grep versions

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechYiiframework

  • SeverityCRITICAL

  • CVSS Score10.0

  • EPSS Probability93.32%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-699q
  • Related CVEs
  • CVE-2024-4990: Yiiframework Yii RCE Vulnerability

  • CVE-2025-2689: Yiiframework Yii RCE Vulnerability

  • CVE-2025-2690: Yiiframework Yii RCE Vulnerability

  • CVE-2024-58136: Yiiframework Yii Privilege Escalation
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