← Vulnerability feed

Vulnerability record · CVE-2024-4990 · published 20 March 2025

CVE-2024-4990: Yii2 Component __set() allows arbitrary class instantiation

Yiiframework · Yii

In yiisoft/yii2 version 2.0.48, the base Component class __set() magic method fails to validate that a value is a valid Behavior class name or configuration. This lets an attacker instantiate arbitrary classes, pass parameters to their constructors, and invoke setter methods. Depending on installed dependencies, this can lead to code execution, sensitive information disclosure, or unauthorized access.

9.1 CVSS 3.1 Critical EPSS 80% · top 0.4% CWE-470 · CWE-470
9.1CVSS 3.1 base score
80%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
2References, 2 tagged exploit
17 Jun 2026Last modified by NVD

Description

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: medium.

critical priorityCVSS 9.1 with network reachability, no authentication or interaction, and very high EPSS plus public exploit references make this an urgent patch target.

What it is

In yiisoft/yii2 version 2.0.48, the base Component class __set() magic method fails to validate that a value is a valid Behavior class name or configuration. This lets an attacker instantiate arbitrary classes, pass parameters to their constructors, and invoke setter methods. Depending on installed dependencies, this can lead to code execution, sensitive information disclosure, or unauthorized access.

Impact

An attacker can instantiate attacker-chosen classes and control constructor arguments and setter calls, which may result in arbitrary code execution, retrieval of sensitive information, or unauthorized access depending on available dependencies.

Attack surface

The flaw is reachable remotely over the network with no authentication and no user interaction required, per the CVSS vector AV:N/AC:L/PR:N/UI:N. It is triggered through the Component __set() magic method when attacker-controlled values are assigned.

Exploitation

No CISA KEV listing is present, but EPSS is very high at 0.80232 (99.598th percentile), and the only references are tagged Exploit, indicating public exploit material exists.

What to do

  • Upgrade yiisoft/yii2 to a version that fixes the __set() validation issue; version 2.0.48 is explicitly affected.
  • If immediate upgrade is not possible, restrict or sanitize untrusted input that can reach Component property assignment, especially behavior configuration values.
  • Review and minimize installed dependencies that expose dangerous constructors or setters, since exploitability depends on available classes.
  • Apply least privilege to the web application process to limit the impact of arbitrary class instantiation and code execution.
  • Monitor vendor advisories and the referenced huntr report for patch guidance and affected version details.

Detection

  • Monitor application logs for unexpected class instantiation errors or unusual setter invocation patterns tied to Component property assignment.
  • Hunt for requests that supply behavior-like configuration values to parameters later assigned via __set().
  • Watch for post-exploitation indicators such as unexpected outbound connections, file writes, or process creation by the web server user.
  • Use dependency and runtime monitoring to detect loading of classes not normally used by the application.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2024-4990 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2024-58136Yii 2 behavior attachment flaw enables remote code executionYii 2 before 2.0.52 mishandles attaching a behavior defined by an __class array key, a regression of CVE-2024-4990. The flaw allows attacker-controll…KEVEPSS 88%analysed10.0CVE-2020-15148Yii 2 unserialize() of untrusted input enables remote code executionYii 2 before 2.0.38 is vulnerable to remote code execution when an application calls unserialize() on arbitrary user input, a classic CWE-502 deseria…EPSS 79%analysed9.8CVE-2023-47130Yiiframework yii deserialization of untrusted data vulnerabilityYii is an open source PHP web framework. yiisoft/yii before version 1.1.29 are vulnerable to Remote Code Execution (RCE) if the application calls `un…EPSS 3.1%9.8CVE-2015-5467Yiiframework yii path traversal vulnerabilityweb\ViewAction in Yii (aka Yii2) 2.x before 2.0.5 allows attackers to execute any local .php file via a relative path in the view parameeter.EPSS 0.88%9.8CVE-2023-26750Yiiframework yii sql injection vulnerabilitySQL injection vulnerability found in Yii Framework Yii 2 Framework before v.2.0.47 allows the a remote attacker to execute arbitrary code via the run…EPSS 1.8%9.8CVE-2022-41922Yiiframework yii deserialization of untrusted data vulnerability`yiisoft/yii` before version 1.1.27 are vulnerable to Remote Code Execution (RCE) if the application calls `unserialize()` on arbitrary user input. T…EPSS 1.2%9.8CVE-2018-7269Yiiframework yii sql injection vulnerabilityThe findByCondition function in framework/db/ActiveRecord.php in Yii 2.x before 2.0.15 allows remote attackers to conduct SQL injection attacks via a…EPSS 1.9%9.8CVE-2018-8073Yiiframework yii code injection vulnerabilityYii 2.x before 2.0.15 allows remote attackers to execute arbitrary LUA code via a variant of the CVE-2018-7269 attack in conjunction with the Redis e…EPSS 1.6%

Source: NIST National Vulnerability Database (record CVE-2024-4990), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.