/

CVE-2026-103474

Severity:

HIGH RISK

(8.8)

Unrestricted Upload (CWE-434) in yii2-starter-kit Backend

CVE-2026-103474

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A file upload validation weakness in yii2-starter-kit allows authenticated users with the manager role to upload PHP files through backend storage actions. When the uploaded files are placed in a web-accessible directory, requesting them may execute server-side code with the application's privileges.

Affected context

The vulnerability occurs in deployments using yii2-starter-kit through version 4.2.0 where backend storage upload actions do not reliably restrict uploaded file types. Exploitation depends on a manager account being able to submit files, the storage location being reachable through the web server, and the server treating uploaded PHP files as executable code.

Exploit preconditions

  • Attack surface: Backend storage upload functionality
  • Required access: An authenticated account with the manager role or equivalent upload permissions
  • Trigger point: Upload handling followed by a request to the stored file
  • Why exploitation is possible: File type restrictions are insufficient, and uploaded server-side scripts may be stored in a web-accessible, executable location

Why this happens

The underlying bug is inadequate server-side validation and handling of uploaded files. When an application relies on client-controlled filenames, extensions, or loosely enforced content checks, an attacker may submit a server-side script where only inert data should be accepted. Storing that file beneath a web-accessible execution path maps to CWE-434, Unrestricted Upload of File with Dangerous Type.

Potential impact

  • An attacker may execute arbitrary code with the web application's privileges.
  • The compromise could expose application data and configuration secrets.
  • The attacker may alter stored content or application behavior.
  • The server could be used for lateral movement or further system compromise.

General mitigation guidance

Mitigation generally focuses on reducing trust in upload metadata and

ensuring uploaded content cannot become executable.

Common defensive patterns include:

  • Allowing only a narrowly defined set of required, non-executable file types.
  • Validating file content independently of the filename and client-provided MIME type.
  • Generating server-side filenames and separating metadata from storage paths.
  • Storing uploads outside the web root or serving them through a non-executing content handler.
  • Applying explicit web-server rules that prevent script execution in upload directories.
  • Restricting upload permissions according to least privilege and reviewing manager-role assignments.
  • Scanning uploaded content and enforcing size, encoding, and storage policies where appropriate.

How teams detect issues like this

High-level detection can include:

  • Static analysis checks for upload handlers that trust extensions, MIME headers, or client-provided filenames.
  • Code review of storage-path construction, filename normalization, and authorization checks.
  • Policy enforcement requiring uploads to use non-executable storage locations.
  • Monitoring for unexpected script extensions, executable content, or newly created files in public directories.
  • Reviewing web-server logs for requests to uploaded files and correlating them with upload events.
  • Automated security review tools may help identify dangerous file-type handling patterns.

Sources

SourceLink
github.comgithub.com/yii-starter-kit/yii2-starter-kit
github.comgithub.com/yii-starter-kit/yii2-starter-kit/blob/cc2c451e8c959c7300b04efea597706a38609f58/backend/modules/file/controllers/StorageController.php#L36
github.comgithub.com/yii-starter-kit/yii2-starter-kit/issues/797
vulncheck.comvulncheck.com/advisories/yii2-starter-kit-through-4.2.0-unrestricted-file-upload-rce

Frequently asked

questions

It can be exploitable through the application's backend upload interface when

the attacker has the required authenticated manager-level access and the

storage directory is web-accessible.

Yes, based on the described behavior, the attacker needs a manager account or

equivalent permissions to use the affected upload actions.

Accept only required non-executable file types, validate content on the

server, and store uploads outside executable web paths.

Combine least-privilege authorization with strict upload policies, generated

filenames, non-executable storage, web-server protections, monitoring, and

security-focused code review.

Find out what's already
exploitable in your codebase.