Patchfirst
CVE-2024-4990 High · 8.1 EPSS 80.1%

Unsafe Reflection in base Component class in yiisoft/yii2

yiisoft · yiisoft/yii2

Official description · CVE.org

In yiisoft/yii2 version 2.0.48, the base Component class contains a vulnerability where the `__set()` magic method does not validate that the value passed is a valid Behavior class name or configuration. This allows an attacker to instantiate arbitrary classes, passing parameters to their constructors and invoking setter methods. Depending on the installed dependencies, various types of attacks are possible, including the execution of arbitrary code, retrieval of sensitive information, and unauthorized access.

Breakdown
25.6 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 20 Mar 2025. No public exploit code or confirmed exploitation is recorded.

See the family tree

A fix was bypassed or incomplete once over 10 months. The latest fix listed for yiisoft/yii2 is 2.0.55.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2024-32877Reflected Cross-site Scripting in yiisoft/yii2 Debug mode30 May 2024
  2. same family
    This CVECVE-2024-4990Unsafe Reflection in base Component class in yiisoft/yii220 Mar 2025
  3. regression ofHigh

    Why these are linked:

    • Stated in the CVE textYii 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.
    • Fixed one release later2.0.49.4 → 2.0.52 (yiisoft/yii2)
    • Same code patched: Component.php (machine-matched)Functions: __setcommit 628d406commit 62d081fcommit 40fe496
    CVE-2024-58136Yiiframework Yii Improper Protection of Alternate Path10 Apr 2025KEV

Fixes in yiisoft/yii2Packagist package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.0.16CVE-2018-2074528 Jan 2019
  2. 2.0.38CVE-2020-1514815 Sep 2020
  3. 2.0.49.4CVE-2024-3287730 May 2024
  4. 2.0.49.4CVE-2024-499020 Mar 2025
  5. 2.0.52CVE-2024-5813610 Apr 2025KEV
  6. 2.0.55CVE-2026-3985020 May 2026Latest listed

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: yiisoft/yii2.

Packagistyiisoft/yii2GHSA-cjcc-p67m-7qxm

Upgrade to 2.0.52 or later

Fixes this CVE and 2 other known vulnerabilities in this package (CVE-2020-15148, CVE-2024-58136).

Set the version to 2.0.52 or later in your composer.json.

First fixed in 2.0.49.4 for CVE-2024-4990.

Affected versions

If you runUpgrade to
All versions before 2.0.49.42.0.52first fix for this CVE: 2.0.49.4

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

1 link, grouped by NVD tag
↑ ↓ chooseEnter openEsc close