A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-39850

CVE-2026-39850: Yii 2 PHP Framework RCE Vulnerability

CVE-2026-39850 is a remote code execution flaw in Yii 2 PHP Framework caused by flawed logic in View::renderPhpFile() that enables Local File Inclusion. This article covers technical details, affected versions, impact, and mitigation.

Published: May 21, 2026

CVE-2026-39850 Overview

CVE-2026-39850 is a Local File Inclusion (LFI) vulnerability in the Yii 2 PHP application framework. Versions 2.0.54 and prior contain flawed logic in the core view rendering method View::renderPhpFile(). The function calls extract($_params_, EXTR_OVERWRITE) before the require statement that loads the view file. A caller-controlled _file_ key in the $params array overwrites the internal local variable specifying which file to include. Attackers can leverage this to achieve information disclosure or remote code execution when paired with a separate primitive that writes attacker-controlled PHP files. The issue is fixed in version 2.0.55.

Critical Impact

Attacker-controlled parameters can overwrite the view file path, enabling Local File Inclusion and potential Remote Code Execution in Yii 2 applications.

Affected Products

  • Yii 2 framework versions 2.0.54 and prior
  • Applications using yii\base\View::renderPhpFile()
  • Applications using yii\web\ErrorHandler view rendering

Discovery Timeline

  • 2026-05-20 - CVE-2026-39850 published to NVD
  • 2026-05-20 - Last updated in NVD database

Technical Details for CVE-2026-39850

Vulnerability Analysis

The vulnerability resides in framework/base/View.php within the renderPhpFile($_file_, $_params_ = []) method. Yii uses underscore-prefixed parameter names ($_file_, $_params_) to avoid collisions with extracted view variables. However, the method calls extract($_params_, EXTR_OVERWRITE) in the same scope as require $_file_. The EXTR_OVERWRITE flag tells PHP to overwrite any existing variable with values from the source array. An attacker who controls keys in $_params_ can include a key named _file_, which overwrites the local variable holding the view path immediately before the require statement executes. The same flaw exists in framework/web/ErrorHandler.php, where Yii::getAlias($_file_) is also reachable from extracted user input. This maps to [CWE-20] Improper Input Validation.

Root Cause

The root cause is the lack of scope isolation between framework internals and caller-supplied template variables. PHP's extract() operates on the current symbol table, so any internal variable sharing a name with an array key is overwritten.

Attack Vector

Exploitation requires that attacker-controlled data flows into the $params array passed to renderPhpFile() or a wrapper such as render(). By supplying a _file_ key, the attacker redirects the require to an arbitrary path. Pairing this with an upload or log-poisoning primitive that writes PHP content yields Remote Code Execution.

php
     public function renderPhpFile($_file_, $_params_ = [])
     {
         $_obInitialLevel_ = ob_get_level();
+        $_renderer_ = function () {
+            extract(func_get_arg(1), EXTR_OVERWRITE);
+            require func_get_arg(0);
+        };
         ob_start();
         ob_implicit_flush(false);
-        extract($_params_, EXTR_OVERWRITE);
         try {
-            require $_file_;
+            call_user_func_array($_renderer_, [$_file_, $_params_]);
             return ob_get_clean();
         } catch (\Exception $e) {
             while (ob_get_level() > $_obInitialLevel_) {

Source: GitHub Commit 109878b

The patch moves extract() and require inside an anonymous function invoked via call_user_func_array(). This isolates the symbol table so caller-supplied keys cannot overwrite $_file_ in the outer scope.

Detection Methods for CVE-2026-39850

Indicators of Compromise

  • Unexpected require or include operations targeting paths outside the application's views/ directory tree
  • PHP file writes in upload, cache, or session directories followed by view-rendering requests
  • Web server access logs showing request parameters named _file_ or containing path-like values to view-rendering endpoints
  • Outbound connections or process spawns originating from the PHP-FPM or web server process

Detection Strategies

  • Conduct static analysis of application code to identify calls to render(), renderFile(), or renderPhpFile() where $params derives from request data such as $_GET, $_POST, or Yii::$app->request
  • Enable PHP open_basedir restrictions and alert on require/include violations in error logs
  • Inspect HTTP request bodies and query strings for the parameter key _file_ reaching Yii controllers

Monitoring Recommendations

  • Monitor file integrity in writable directories such as runtime/, web/assets/, and any upload locations for newly created .php files
  • Log and review all view->render* invocations with non-standard file path arguments
  • Track process lineage from php-fpm, httpd, or nginx workers for unexpected child processes

How to Mitigate CVE-2026-39850

Immediate Actions Required

  • Upgrade Yii 2 to version 2.0.55 or later, which contains the official fix
  • Audit application code for any path where untrusted input is merged into the $params array passed to view rendering methods
  • Restrict and validate file upload destinations to non-executable directories and confirm web server configuration prevents PHP execution there

Patch Information

The vulnerability is resolved in Yii 2 version 2.0.55. The fix isolates extract() and require inside an anonymous function so caller-controlled keys cannot overwrite the $_file_ variable. Review the GitHub Security Advisory GHSA-5vpg-rj7q-qpw2 and the upstream commit for full technical details.

Workarounds

  • If upgrading is not immediately possible, sanitize $params arrays to remove reserved keys such as _file_, _params_, and _obInitialLevel_ before passing them to view methods
  • Configure PHP open_basedir to restrict require/include operations to the application's view directories
  • Ensure file upload directories are stored outside the document root and that the web server is configured to refuse PHP execution within them
bash
# Composer upgrade to the patched release
composer require yiisoft/yii2:^2.0.55
composer update yiisoft/yii2

# Verify installed version
php -r "require 'vendor/autoload.php'; echo Yii::getVersion();"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechYii

  • SeverityHIGH

  • CVSS Score7.4

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-20
  • Technical References
  • GitHub Commit Details

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-9813: FlowIntel SSRF Vulnerability

  • CVE-2026-4377: D-Link DWR-X1820 Auth Bypass Vulnerability

  • CVE-2026-47074: ex_aws_sns Auth Bypass Vulnerability

  • CVE-2026-46241: Linux Kernel Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English