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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | yiisoft/yii2 | < 2.0.55 | 2.0.55 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N- Weakness (CWE)
CWE-20, CWE-98- Platform
- Composer
- Package
yiisoft/yii2- Disclosed
- 11.05.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-5vpg-rj7q-qpw2 - CC BY 4.0
Vulnerability history: yiisoft/yii2
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 12
- First → latest
- 09.2020 05.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- Critical 2
- High 5
- Medium 5
Disclosures per year
- 2020: 1
- 2021: 0
- 2022: 6
- 2023: 1
- 2024: 2
- 2025: 1
- 2026: 1
-
Yii 2: Local file inclusion via view parameter name collision this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.