CVE-2026-39850: Yii 2 Local File Inclusion Vulnerability via Parameter Name Collision

yiisoft/yii2 Updated 11 May 2026

Summary

11/05/2026
Yes i
High
7.4

CVE-2026-39850: Yii 2: Local file inclusion via view parameter name collision. Affects yiisoft/yii2 versions < 2.0.55. Fixed in 2.0.55. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Yii 2 is a high-performance PHP framework designed for developing web applications. It provides a rich set of features, including MVC architecture, security measures, and database access. However, it is susceptible to vulnerabilities that can compromise the security of applications built using this framework. This specific vulnerability arises from the way the framework handles view rendering, particularly in the View::renderPhpFile() method.

Vulnerability Detail

The vulnerability occurs due to the use of the extract($_params_, EXTR_OVERWRITE) function in the View::renderPhpFile() method, which allows a caller-controlled parameter named _file_ to overwrite the internal variable that specifies the file to be included. This leads to Local File Inclusion (LFI), enabling attackers to read arbitrary files on the server. If an attacker can also write PHP files, this could potentially lead to Remote Code Execution (RCE), posing a significant risk of information disclosure and system compromise.

How To Fix

Minimum fixed version

2.0.55

This is the first release that contains the fix.

composer require yiisoft/yii2:2.0.55

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no workarounds available to mitigate this vulnerability other than updating to the patched version.

Conclusion

The CVE-2026-39850 vulnerability in Yii 2 poses a significant risk due to its potential for Local File Inclusion and possible Remote Code Execution. It is essential to update to version 2.0.55 or later to mitigate this risk and ensure the security of your applications.

See every vulnerability recorded for yiisoft/yii2 →

Share this vulnerability

FAQ

Local File Inclusion (LFI) is a type of vulnerability that allows an attacker to include files on a server through the web browser. This can lead to unauthorized access to sensitive files.

If exploited, this vulnerability can allow attackers to read sensitive files from your server, potentially leading to information disclosure or even remote code execution if they can upload malicious files.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your composer.lock file for vulnerabilities without requiring any signup.

If you cannot update the package immediately, it is crucial to monitor your application for any suspicious activity and consider implementing additional security measures to protect sensitive files.

The CVSS score of this vulnerability is 7.4, indicating a high level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for yiisoft/yii2.

How To Fix

Minimum fixed version

2.0.55

This is the first release that contains the fix.

composer require yiisoft/yii2:2.0.55

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback