CVE-2026-39850: CWE-20: Improper Input Validation in yiisoft yii2
Yii 2 versions 2.0.54 and earlier contain a vulnerability in the core view rendering method View::renderPhpFile() that allows local file inclusion due to improper input validation. This occurs because the function uses extract($_params_, EXTR_OVERWRITE) before including the view file, enabling an attacker to overwrite the internal variable specifying the file to include via a specially crafted _file_ key in the parameters array. This flaw can lead to remote code execution if an attacker can write PHP files through another vulnerability, as well as information disclosure. The issue is fixed in version 2.0.55.
AI Analysis
Technical Summary
The vulnerability in Yii 2 (CVE-2026-39850) arises from improper input validation in the View::renderPhpFile() method. The method extracts variables from the caller-supplied parameters array with EXTR_OVERWRITE, allowing a malicious _file_ key to override the internal file path variable used in the require statement. This leads to local file inclusion, which can disclose sensitive information or enable remote code execution if combined with a separate file write vulnerability. The flaw affects all versions prior to 2.0.55 and has a CVSS 3.1 score of 7.4 (high severity).
Potential Impact
Successful exploitation can result in local file inclusion, potentially exposing sensitive information. If an attacker can write PHP files via another vulnerability, this flaw can lead to remote code execution. The vulnerability does not directly allow code execution without an additional file write primitive. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
This vulnerability is fixed in Yii 2 version 2.0.55. Users should upgrade to version 2.0.55 or later to remediate this issue. Since this is not a cloud service, patching the affected software is required. Patch status is confirmed by the vendor's versioning information. No alternative mitigations are indicated.
CVE-2026-39850: CWE-20: Improper Input Validation in yiisoft yii2
Description
Yii 2 versions 2.0.54 and earlier contain a vulnerability in the core view rendering method View::renderPhpFile() that allows local file inclusion due to improper input validation. This occurs because the function uses extract($_params_, EXTR_OVERWRITE) before including the view file, enabling an attacker to overwrite the internal variable specifying the file to include via a specially crafted _file_ key in the parameters array. This flaw can lead to remote code execution if an attacker can write PHP files through another vulnerability, as well as information disclosure. The issue is fixed in version 2.0.55.
CVSS v3.1
Score 7.4high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Yii 2 (CVE-2026-39850) arises from improper input validation in the View::renderPhpFile() method. The method extracts variables from the caller-supplied parameters array with EXTR_OVERWRITE, allowing a malicious _file_ key to override the internal file path variable used in the require statement. This leads to local file inclusion, which can disclose sensitive information or enable remote code execution if combined with a separate file write vulnerability. The flaw affects all versions prior to 2.0.55 and has a CVSS 3.1 score of 7.4 (high severity).
Potential Impact
Successful exploitation can result in local file inclusion, potentially exposing sensitive information. If an attacker can write PHP files via another vulnerability, this flaw can lead to remote code execution. The vulnerability does not directly allow code execution without an additional file write primitive. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
This vulnerability is fixed in Yii 2 version 2.0.55. Users should upgrade to version 2.0.55 or later to remediate this issue. Since this is not a cloud service, patching the affected software is required. Patch status is confirmed by the vendor's versioning information. No alternative mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-07T19:13:20.378Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0e173eba1db47362a37eac
Added to database: 05/20/2026, 20:19:10 UTC
Last enriched: 05/27/2026, 20:58:26 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 135
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.