CVE-2024-58136: CWE-424 Improper Protection of Alternate Path in yiiframework Yii
Yii 2 before 2.0.52 mishandles the attaching of behavior that is defined by an __class array key, a CVE-2024-4990 regression, as exploited in the wild in February through April 2025.
AI Analysis
Technical Summary
CVE-2024-58136 is a critical security vulnerability affecting the Yii PHP framework, specifically versions prior to 2.0.52. The issue arises from improper handling of behavior attachment when the behavior is defined using an __class array key, which is a regression of a previously known vulnerability (CVE-2024-4990). This flaw falls under CWE-424, which relates to improper protection of alternate paths, allowing attackers to manipulate the framework’s behavior attachment mechanism. Exploiting this vulnerability enables remote attackers to execute arbitrary code on the affected system without requiring authentication or user interaction. The vulnerability impacts the confidentiality, integrity, and availability of affected applications, as attackers can potentially take full control of the web application and underlying server. The CVSS v3.1 score is 9.0, reflecting the critical nature of this vulnerability, with network attack vector, high attack complexity, no privileges required, no user interaction, and scope change. Although no known exploits have been reported in the wild as of the publication date, the similarity to a previously exploited vulnerability and the critical CVSS score suggest a high risk of exploitation. Yii framework is widely used in PHP web applications, making this vulnerability relevant to many organizations relying on this technology stack. The vulnerability was publicly disclosed on April 10, 2025, and users are advised to upgrade to Yii 2.0.52 or later once available to remediate the issue.
Potential Impact
For European organizations, the impact of CVE-2024-58136 can be severe. Many enterprises and government agencies in Europe use PHP-based web applications, including those built on the Yii framework. Successful exploitation could lead to full system compromise, data breaches involving sensitive personal and corporate information, disruption of services, and potential regulatory non-compliance under GDPR due to unauthorized data access. The vulnerability’s ability to be exploited remotely without authentication increases the attack surface, especially for externally facing web applications. This could result in financial losses, reputational damage, and operational downtime. Additionally, critical infrastructure or public sector applications using Yii could be targeted for espionage or sabotage. The widespread use of Yii in e-commerce, content management, and custom business applications across Europe heightens the risk of large-scale impact if the vulnerability is weaponized.
Mitigation Recommendations
1. Immediately upgrade all affected Yii framework installations to version 2.0.52 or later once the patch is released by the vendor. 2. Until patches are applied, implement web application firewall (WAF) rules to detect and block suspicious requests that attempt to exploit behavior attachment mechanisms. 3. Conduct a thorough code review of custom behaviors attached via the __class array key to ensure no unsafe or untrusted input is used. 4. Restrict network access to internal Yii-based applications by using VPNs or IP whitelisting to reduce exposure. 5. Enable detailed logging and monitor for anomalous activity indicative of exploitation attempts, such as unexpected behavior attachments or code execution patterns. 6. Educate development teams about secure coding practices related to behavior attachment and alternate path protections. 7. Consider deploying runtime application self-protection (RASP) solutions to detect and prevent exploitation attempts in real time. 8. Regularly audit third-party dependencies and frameworks for updates and vulnerabilities to maintain a secure development environment.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden
CVE-2024-58136: CWE-424 Improper Protection of Alternate Path in yiiframework Yii
Description
Yii 2 before 2.0.52 mishandles the attaching of behavior that is defined by an __class array key, a CVE-2024-4990 regression, as exploited in the wild in February through April 2025.
AI-Powered Analysis
Technical Analysis
CVE-2024-58136 is a critical security vulnerability affecting the Yii PHP framework, specifically versions prior to 2.0.52. The issue arises from improper handling of behavior attachment when the behavior is defined using an __class array key, which is a regression of a previously known vulnerability (CVE-2024-4990). This flaw falls under CWE-424, which relates to improper protection of alternate paths, allowing attackers to manipulate the framework’s behavior attachment mechanism. Exploiting this vulnerability enables remote attackers to execute arbitrary code on the affected system without requiring authentication or user interaction. The vulnerability impacts the confidentiality, integrity, and availability of affected applications, as attackers can potentially take full control of the web application and underlying server. The CVSS v3.1 score is 9.0, reflecting the critical nature of this vulnerability, with network attack vector, high attack complexity, no privileges required, no user interaction, and scope change. Although no known exploits have been reported in the wild as of the publication date, the similarity to a previously exploited vulnerability and the critical CVSS score suggest a high risk of exploitation. Yii framework is widely used in PHP web applications, making this vulnerability relevant to many organizations relying on this technology stack. The vulnerability was publicly disclosed on April 10, 2025, and users are advised to upgrade to Yii 2.0.52 or later once available to remediate the issue.
Potential Impact
For European organizations, the impact of CVE-2024-58136 can be severe. Many enterprises and government agencies in Europe use PHP-based web applications, including those built on the Yii framework. Successful exploitation could lead to full system compromise, data breaches involving sensitive personal and corporate information, disruption of services, and potential regulatory non-compliance under GDPR due to unauthorized data access. The vulnerability’s ability to be exploited remotely without authentication increases the attack surface, especially for externally facing web applications. This could result in financial losses, reputational damage, and operational downtime. Additionally, critical infrastructure or public sector applications using Yii could be targeted for espionage or sabotage. The widespread use of Yii in e-commerce, content management, and custom business applications across Europe heightens the risk of large-scale impact if the vulnerability is weaponized.
Mitigation Recommendations
1. Immediately upgrade all affected Yii framework installations to version 2.0.52 or later once the patch is released by the vendor. 2. Until patches are applied, implement web application firewall (WAF) rules to detect and block suspicious requests that attempt to exploit behavior attachment mechanisms. 3. Conduct a thorough code review of custom behaviors attached via the __class array key to ensure no unsafe or untrusted input is used. 4. Restrict network access to internal Yii-based applications by using VPNs or IP whitelisting to reduce exposure. 5. Enable detailed logging and monitor for anomalous activity indicative of exploitation attempts, such as unexpected behavior attachments or code execution patterns. 6. Educate development teams about secure coding practices related to behavior attachment and alternate path protections. 7. Consider deploying runtime application self-protection (RASP) solutions to detect and prevent exploitation attempts in real time. 8. Regularly audit third-party dependencies and frameworks for updates and vulnerabilities to maintain a secure development environment.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- mitre
- Date Reserved
- 2025-04-10T00:00:00.000Z
- Cisa Enriched
- true
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 682d9837c4522896dcbeb7da
Added to database: 5/21/2025, 9:09:11 AM
Last enriched: 10/21/2025, 8:05:28 PM
Last updated: 12/1/2025, 9:46:46 AM
Views: 54
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-13816: Path Traversal in moxi159753 Mogu Blog v2
MediumCVE-2025-13815: Unrestricted Upload in moxi159753 Mogu Blog v2
MediumCVE-2025-61619: cwe-20 Improper Input Validation in Unisoc (Shanghai) Technologies Co., Ltd. T8100/T9100/T8200/T8300
HighCVE-2025-61618: cwe-20 Improper Input Validation in Unisoc (Shanghai) Technologies Co., Ltd. T8100/T9100/T8200/T8300
HighCVE-2025-61617: cwe-20 Improper Input Validation in Unisoc (Shanghai) Technologies Co., Ltd. T8100/T9100/T8200/T8300
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.