CVE-2026-39850: Yii 2 Local File Inclusion Vulnerability
HIGHCVE-2026-39850 is a HIGH (CVSS 7.4) local file inclusion vulnerability (CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')) affecting Yii 2 libraries in the Packagist ecosystem. The issue involves local file inclusion via view parameter name collision. Remediation is available by upgrading affected packages to version 2.0.55.
CVE-2026-39850 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-39850
To remediate this vulnerability, upgrade all affected Yii 2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade yiisoft/yii2 to 2.0.55
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for yiisoft/yii2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-39850, inspect your project dependencies for Yii 2:
inspect dependencies for yiisoft/yii2
Analyze the terminal output to locate any version of Yii 2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.55), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion'), where the php application receives input from an upstream component, but it does not restrict or incorrectly restricts the input before its usage in "require," "include," or similar functions. In Yii 2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-39850 Affected Yii 2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
yiisoft/yii2
|
Packagist |
< 2.0.55
|
2.0.55
|
References
Frequently Asked Questions
What is CVE-2026-39850?
Which Yii 2 versions are affected?
What version fixes CVE-2026-39850?
Is yiisoft/yii2 affected?
What is the CVSS score of CVE-2026-39850?
What CWE is associated with CVE-2026-39850?
How can I check Packagist dependencies for CVE-2026-39850?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5vpg-rj7q-qpw2",
"modified" : "2026-06-08T20:14:36Z",
"published" : "2026-05-11T19:34:28Z",
"aliases" : [ "CVE-2026-39850" ],
"summary" : "Yii 2: Local file inclusion via view parameter name collision",
"details" : "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.\n\n### Impact\n\n- Local File Inclusion (arbitrary file read via non-PHP files)\n- Potential RCE if attacker can write PHP files via a separate primitive\n- Information disclosure\n\n### Patches\n\n2.0.55\n\n### Workarounds\n\nNo.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "yiisoft/yii2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.55"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/yiisoft/yii2/security/advisories/GHSA-5vpg-rj7q-qpw2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39850"
}, {
"type" : "WEB",
"url" : "https://github.com/yiisoft/yii2/commit/109878b491dbffa541032bc99fb5e26d12cd0375"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/yiisoft/yii2"
}, {
"type" : "WEB",
"url" : "https://github.com/yiisoft/yii2/releases/tag/2.0.55"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-98" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-11T19:34:28Z",
"nvd_published_at" : "2026-05-20T20:16:39Z"
}
}