CVE-2024-58136: yiisoft/yii2 Mishandles the Attaching of Behavior Defined by a `__class` Array Key
CVE-2024-58136 · Severity: critical · CVSS 3.1 · Exploited in the wild · Published 2025-04-10
Yii Framework 2 mishandles the attaching of behavior defined by an __class array key, resulting in an improper protection of alternate path vulnerability. This flaw is a regression of CVE-2024-4990 and allows remote attackers to execute arbitrary code. The vulnerability also impacts downstream products such as Craft CMS.
Yes. yiisoft/yii2 (Packagist): upgrade to 2.0.52 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-58136 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2024-58136?
Check whether you run yiisoft/yii2 (Packagist) or Yiiframework Yii at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
yiisoft/yii2 (Packagist): upgrade to 2.0.52 or later
composer require yiisoft/yii2:^2.0.52
Affected products
Yiiframework Yii 2 before 2.0.52
Pixel & Tonic Craft CMS
Identifiers
CVE-2024-58136
GHSA-ggwg-cmwp-46r5
Timeline
2025-04-09: disclosed: NVD Published Date
2025-05-02: kev added: Added to CISA Known Exploited Vulnerabilities Catalog
2025-02: exploited: Exploitation in the wild began as early as February 2025
2025-04-28: patched: Yii 2.0.52 released to address the regression