Authenticated command execution via MockClass gadget chain
Published Mar 24, 2025 · Updated Mar 24, 2025
Deserialization in Yii 2 through 2.0.39 allows remote authenticated users to execute commands through a crafted serialized object. A gadget chain invokes PHPUnit MockClass::generate, which evaluates the object's attacker-controlled classCode property as PHP code. Exploitation requires an application-defined remote unserialize entry point and availability of the PHPUnit, Faker, and related gadget classes.
Summary
What happened
Deserialization in Yii 2 through 2.0.39 allows remote authenticated users to execute commands through a crafted serialized object. A gadget chain invokes PHPUnit MockClass::generate, which evaluates the object's attacker-controlled classCode property as PHP code. Exploitation requires an application-defined remote unserialize entry point and availability of the PHPUnit, Faker, and related gadget classes.
The record
- CVE
- CVE-2025-2690
- Published
- Mar 24, 2025
- Updated
- Mar 24, 2025
- Vendor
- Yiisoft
- Product
- Yii 2
- Classifications
- CWE-20, CWE-502, T1190
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Mar 24, 2025CVE publishedPublication date reported by the CVE source.
- Mar 24, 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.0.0
- Affected versionversion=2.0.1
- Affected versionversion=2.0.10
- Affected versionversion=2.0.11
- Affected versionversion=2.0.12
- Affected versionversion=2.0.13
- Affected versionversion=2.0.14
- Affected versionversion=2.0.15
- Affected versionversion=2.0.16
- Affected versionversion=2.0.17
- Affected versionversion=2.0.18
- Affected versionversion=2.0.19
- Affected versionversion=2.0.2
- Affected versionversion=2.0.20
- Affected versionversion=2.0.21
- Affected versionversion=2.0.22
- Affected versionversion=2.0.23
- Affected versionversion=2.0.24
- Affected versionversion=2.0.25
- Affected versionversion=2.0.26
- Affected versionversion=2.0.27
- Affected versionversion=2.0.28
- Affected versionversion=2.0.29
- Affected versionversion=2.0.3
- Affected versionversion=2.0.30
- Affected versionversion=2.0.31
- Affected versionversion=2.0.32
- Affected versionversion=2.0.33
- Affected versionversion=2.0.34
- Affected versionversion=2.0.35
- Affected versionversion=2.0.36
- Affected versionversion=2.0.37
- Affected versionversion=2.0.38
- Affected versionversion=2.0.39
- Affected versionversion=2.0.4
- Affected versionversion=2.0.5
- Affected versionversion=2.0.6
- Affected versionversion=2.0.7
- Affected versionversion=2.0.8
- Affected versionversion=2.0.9
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
- Yii 2 MockClass deserialization proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
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