Yii 2: Local file inclusion via view parameter name collision
The core view rendering method `View::renderPhpFile()` calls `extract($_params_, EXTR_OVERWRITE)` before the `require` statement that includes the view file. A caller-controlled parameter named `_file_` in the `$params` array overwrites the internal local variable that specifies which file is included — enabling a Local File Inclusion primitive. ### Impact - Local File Inclusion (arbitrary file read via non-PHP files) - Potential RCE if attacker can write PHP files via a separate primitive - Information disclosure ### Patches 2.0.55 ### Workarounds No.
describes (1)
Related CVEs.
| ID | severity | exploitable | ||
|---|---|---|---|---|
| CVE-2026-39850US | — | — | ||
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… | ||||
references
External citations — patches, advisories, analysis.
- https://github.com/yiisoft/yii2PACKAGE
- https://github.com/yiisoft/yii2/commit/109878b491dbffa541032bc99fb5e26d12cd0375WEB
- https://github.com/yiisoft/yii2/releases/tag/2.0.55WEB
- https://github.com/yiisoft/yii2/security/advisories/GHSA-5vpg-rj7q-qpw2WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-39850ADVISORY
Advisories like this name the exposed products attackers go after on your perimeter. See what is exposed on your perimeter with a free passive scan.
Free scan