CVE-2026-39850: Yii 2: Local file inclusion via view parameter name collision
The core view rendering method View::renderPhpFile() calls extract($params, EXTROVERWRITE) 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.
Published May 11, 2026 · Updated Jun 8, 2026
Affected packages
yiisoft/yii2
- Ecosystem
- Composer (PHP)
- Affected
- < 2.0.55
- Fixed in
- 2.0.55
- Check
composer show yiisoft/yii2
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to khuroohamid.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2024-58136
yiisoft/yii2 Mishandles the Attaching of Behavior Defined by a `__class` Array Key
critical9.0ExploitedApr 10, 2025CVE-2024-32877
Reflected Cross-site Scripting in yiisoft/yii2 Debug mode
medium4.2Jun 2, 2024CVE-2024-4990
Unsafe Reflection in base Component class in yiisoft/yii2
high8.1Jun 2, 2024
