Remote code execution via alternate class key
Published Apr 10, 2025 · Updated Oct 21, 2025
Object injection in Yiisoft Yii before 2.0.52 allows remote attackers to execute arbitrary code through crafted behavior configuration. Component::__set validates the class key as a Behavior subclass, but Yii::createObject prioritizes an unchecked __class key and instantiates that class instead. Exploitation requires an application path that maps attacker-controlled configuration onto a Yii Component; observed Craft CMS attacks achieved server-side code execution.
Summary
What happened
Object injection in Yiisoft Yii before 2.0.52 allows remote attackers to execute arbitrary code through crafted behavior configuration. Component::__set validates the class key as a Behavior subclass, but Yii::createObject prioritizes an unchecked __class key and instantiates that class instead. Exploitation requires an application path that maps attacker-controlled configuration onto a Yii Component; observed Craft CMS attacks achieved server-side code execution.
The record
- CVE
- CVE-2024-58136
- Published
- Apr 10, 2025
- Updated
- Oct 21, 2025
- Vendor
- Yiisoft
- Product
- Yii
- Classifications
- CWE-424, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Feb 14, 2025Exploitation reportedCraft CMS server compromise
- Apr 10, 2025CVE publishedPublication date reported by the CVE source.
- May 2, 2025Exploitation reportedCISA Known Exploited Vulnerabilities listing
- Oct 21, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=2 <2.0.52
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- SensePost Craft CMS Yii exploit chainfunctional · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Reported exploitation
- Craft CMS server compromisereported exploitation
- CISA Known Exploited Vulnerabilities listingknown exploited catalog
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo