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-2024-58136

CVE-2024-58136: Yiiframework Yii Privilege Escalation

CVE-2024-58136 is a privilege escalation vulnerability in Yiiframework Yii 2 before 2.0.52 involving behavior attachment mishandling. This post covers the technical details, affected versions, impact, and mitigation.

Published: March 11, 2026

CVE-2024-58136 Overview

CVE-2024-58136 is a critical remote code execution vulnerability affecting the Yii 2 PHP framework versions prior to 2.0.52. The vulnerability stems from improper handling of behavior attachment when defined using an __class array key, representing a regression of the previously patched CVE-2024-4990. This flaw has been actively exploited in the wild between February and April 2025, prompting its addition to the CISA Known Exploited Vulnerabilities (KEV) catalog.

Critical Impact

This vulnerability enables unauthenticated remote attackers to achieve arbitrary code execution on affected Yii 2 applications through malicious behavior attachment, with confirmed active exploitation campaigns targeting production systems.

Affected Products

  • Yiiframework Yii versions prior to 2.0.52
  • Applications built on vulnerable Yii 2 framework versions
  • CraftCMS and other platforms utilizing the Yii 2 framework

Discovery Timeline

  • 2025-04-10 - CVE-2024-58136 published to NVD
  • 2025-11-05 - Last updated in NVD database

Technical Details for CVE-2024-58136

Vulnerability Analysis

This vulnerability is classified under CWE-424 (Improper Protection of Alternate Path) and represents a critical regression in the Yii 2 framework's behavior attachment mechanism. The flaw occurs in the framework/base/Component.php file where the framework processes configuration arrays for attaching behaviors to components.

The root issue lies in the incomplete fix for CVE-2024-4990. While the original patch addressed behavior attachment via the class array key, it failed to account for the alternative __class array key syntax that Yii 2 also supports for object instantiation. Attackers can exploit this oversight to bypass the security controls and attach arbitrary behaviors to framework components, ultimately achieving remote code execution.

The vulnerability is particularly dangerous as it requires no authentication and can be exploited remotely over the network with low complexity. Active exploitation campaigns leveraging this vulnerability have been observed targeting CraftCMS installations and other Yii 2-based applications.

Root Cause

The vulnerability exists in the Component.php file's behavior attachment logic. The original security fix for CVE-2024-4990 only validated the class key when checking if a behavior configuration should be allowed. However, Yii 2 supports an alternative __class key for specifying object classes during instantiation. This oversight allowed attackers to bypass the security check by using __class instead of class in their malicious payloads.

Attack Vector

The attack vector is network-based, requiring no user interaction or prior authentication. Attackers can craft malicious HTTP requests containing specially formatted configuration data that includes the __class key to specify arbitrary PHP classes as behaviors. When the Yii 2 framework processes this data through vulnerable code paths, it instantiates and attaches the attacker-specified class, leading to arbitrary code execution on the server.

php
             $name = trim(substr($name, 3));
             if ($value instanceof Behavior) {
                 $this->attachBehavior($name, $value);
-            } elseif (isset($value['class']) && is_subclass_of($value['class'], Behavior::class, true)) {
+            } elseif ((isset($value['class']) && is_subclass_of($value['class'], Behavior::class)) || (isset($value['__class']) && is_subclass_of($value['__class'], Behavior::class))) {
                 $this->attachBehavior($name, Yii::createObject($value));
             } elseif (is_string($value) && is_subclass_of($value, Behavior::class, true)) {
                 $this->attachBehavior($name, Yii::createObject($value));

Source: GitHub Commit 40fe496

Detection Methods for CVE-2024-58136

Indicators of Compromise

  • HTTP requests containing __class parameters in POST data or JSON payloads targeting Yii 2 application endpoints
  • Unusual PHP process spawning or command execution on web servers running Yii 2 applications
  • Web server access logs showing suspicious requests with serialized PHP data containing behavior attachment patterns
  • File system changes indicating webshell deployment or unauthorized file creation

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect and block requests containing __class keys in request parameters
  • Monitor PHP error logs for unexpected class instantiation errors or behavior attachment failures
  • Deploy network-based intrusion detection signatures for known CVE-2024-58136 exploitation patterns
  • Review application logs for anomalous object instantiation patterns or unauthorized behavior attachments

Monitoring Recommendations

  • Enable verbose logging for Yii 2 framework component initialization and behavior attachment operations
  • Implement file integrity monitoring on web application directories to detect webshell deployment
  • Configure alerting for outbound connections from web server processes to detect post-exploitation activity
  • Monitor for process execution chains involving PHP spawning shell commands or other suspicious child processes

How to Mitigate CVE-2024-58136

Immediate Actions Required

  • Upgrade all Yii 2 framework installations to version 2.0.52 or later immediately
  • If immediate patching is not possible, implement WAF rules to block requests containing __class parameters
  • Review web server logs for indicators of prior exploitation attempts dating back to February 2025
  • Conduct forensic analysis on potentially compromised systems, particularly CraftCMS installations

Patch Information

The Yii Framework development team has released version 2.0.52 which addresses this vulnerability. The fix modifies the behavior attachment logic in framework/base/Component.php to properly validate both class and __class array keys against the Behavior class before allowing instantiation.

Organizations should apply the patch by updating their Yii 2 framework dependency:

  • Review the official Yii Framework security advisory for detailed upgrade instructions
  • Examine the version comparison on GitHub to understand all changes included in the security release
  • Reference the GitHub Pull Request #20232 for technical details on the fix

Workarounds

  • Deploy Web Application Firewall rules to filter requests containing __class in request bodies or parameters
  • Implement input validation at the application layer to reject configuration data containing __class keys from untrusted sources
  • Consider network segmentation to limit the blast radius of potential compromise until patching is complete
  • Disable or restrict access to endpoints that process user-controlled configuration data
bash
# Example Composer update command to patch Yii 2
composer require "yiisoft/yii2:^2.0.52"

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

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechYiiframework

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability59.28%

  • 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
  • CISA KEV Information
  • In CISA KEVYes
  • CWE References
  • CWE-424

  • NVD-CWE-Other
  • Technical References
  • GitHub Version Comparison

  • GitHub Issue Comment #2252459709

  • SensePost Blog Analysis

  • CISA Known Exploited Vulnerability
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Pull Request #20232

  • Yii Framework Security Update
  • Related CVEs
  • CVE-2024-4990: Yiiframework Yii RCE Vulnerability

  • CVE-2025-2689: Yiiframework Yii RCE Vulnerability

  • CVE-2025-2690: Yiiframework Yii RCE Vulnerability

  • CVE-2020-15148: Yiiframework Yii 2 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