Skip to main content

CodeIgniter4 EUVDEUVD-2026-45325

| CVE-2026-48062 CRITICAL
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-06-11 https://github.com/codeigniter4/CodeIgniter4 GHSA-2gr4-ppc7-7mhx
9.8
CVSS 3.1 · Vendor: https://github.com/codeigniter4/CodeIgniter4
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify CodeIgniter4 app with public upload endpoint
  2. Delivery
    Craft GIF/PHP polyglot named shell.php
  3. Exploit
    POST file through ext_in-validated form
  4. Install
    Validation passes on MIME-derived extension
  5. C2
    File written to web root with original name
  6. Execute
    Request /uploads/shell.php to trigger PHP execution
  7. Impact
    Obtain RCE as web server user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK

2 techniques across 2 tactics: Command and Control, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following to be simultaneously true in the target application: (1) a publicly reachable upload endpoint built by the application developer, since the default CodeIgniter4 skeleton ships no such endpoint; (2) the validation chain must rely on the ext_in rule for extension allow-listing, optionally combined with is_image and mime_in - sites using custom extension checks are not affected; (3) the upload handler must call $file->move($path) without supplying $file->getRandomName(), thereby preserving the attacker-controlled .php filename; (4) the destination directory must be inside the document root and reachable over HTTP; and (5) the web server must be configured to execute PHP (or another scripting handler) for files in that directory. The flaw is pre-authentication only to the extent the upload endpoint itself is unauthenticated; if the application gates uploads behind login, exploitation requires valid credentials. No user interaction beyond the attacker submitting the request is required.

Impact

The published CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8) overstates the practical risk because exploitation is gated by a chain of developer-controlled conditions enumerated by the vendor: a public upload endpoint must exist (the default CodeIgniter4 application ships none), ext_in must be used for extension policing, the developer must call $file->move($path) preserving the client filename, the destination must be inside the web root, and the web server must be configured to execute PHP (or other scripts) from that directory. Where all five conditions hold, exploitation is trivial and pre-authentication, justifying the high score; where any one is missing, the bug is not exploitable. No EPSS or KEV data was supplied in the input, and no public exploit identified at time of analysis, though the patch's test cases (testExtensionFailsForMismatchedClientExtension uploading shell.php with GIF content) serve as a near-PoC. Net real-world priority: high for any CodeIgniter4 application that exposes avatar/attachment/profile-image uploads, moderate for stock deployments.

Exploit ScenarioDerived

An unauthenticated attacker visits a CodeIgniter4 application's avatar/profile-picture upload endpoint and submits a polyglot file named shell.php whose first bytes are the GIF89a magic header followed by <?php code; the mime_in[avatar,image/gif] and ext_in[avatar,gif] rules both pass because content-sniffing yields gif, and $file->move($path) writes the file to the public web root preserving the .php suffix. The attacker then requests /uploads/shell.php, the web server executes the embedded PHP, and the attacker obtains remote code execution as the web server user. The patch's own test testExtensionFailsForMismatchedClientExtension reproduces the precise upload payload, making weaponization straightforward for any researcher reading the diff.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 11, 2026

Arbitrary file upload leading to remote code execution in CodeIgniter4 framework versions prior to 4.7.3 occurs because the ext_in validation rule inspects the MIME-derived guessed extension rather than the client-supplied filename extension. Applications that accept user uploads, rely on ext_in for extension allow-listing, persist files under their original client filename inside a web-accessible directory, and permit PHP execution in that directory can be coerced into writing and executing attacker-controlled PHP. No public exploit identified at time of analysis, though the patch commit and tests publicly demonstrate the bypass technique (a polyglot file named shell.php carrying GIF magic bytes).

RemediationAI

Vendor-released patch: upgrade codeigniter4/framework to 4.7.3 or later via Composer (composer require codeigniter4/framework:^4.7.3); the fix is commit 29299349e7d232e9532767c7cefaed30957309be, which now validates getClientExtension() first and additionally requires guessExtension() to match it. If immediate upgrade is not possible, the vendor lists several compensating controls: store uploads outside the public web root (for example under writable/uploads) which removes script-execution exposure but requires application code changes to serve the files, call $file->store() or $file->move($path, $file->getRandomName()) to discard the attacker-controlled filename entirely (side effect: original filenames are lost and any code that displays them must be adapted), disable PHP/script execution in upload directories via web server configuration such as Apache <Directory> php_admin_flag engine off or nginx location ~ \.php$ { return 403; } (side effect: legitimate scripts in that path also stop running), or add a custom rule that rejects when $file->getClientExtension() is empty, not in the allow-list, or does not equal $file->guessExtension(). Full advisory and migration notes are at https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-2gr4-ppc7-7mhx and the v4.7.3 upgrade guide.

Affected VersionsENISA

CodeIgniter4 < 4.7.3

Affected Packages

composer codeigniter4/framework fix: 4.7.3
euvd codeigniter4 fix: 4.7.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CodeIgniter4 is a widely deployed PHP web framework (Composer package codeigniter4/framework, identified by pkg:composer/codeigniter4_framework). The flaw lives in system/Validation/StrictRules/FileRules.php::ext_in(), which previously called $file->guessExtension() - a method that returns an extension derived from the file's detected MIME type, not from the user-supplied filename. Because guessExtension() for a file containing GIF magic bytes returns gif regardless of whether the client named it shell.php, the allow-list check ext_in[avatar,gif] passed for any polyglot whose content sniffed as an allowed image. The root cause class is CWE-434 (Unrestricted Upload of File with Dangerous Type): the security decision was made on derived/sniffed content metadata rather than on the attacker-controlled filename that ultimately gets written to disk by $file->move($path) when the developer preserves the original name.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/codeigniter4/CodeIgniter4) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.1 HIGH

Network-reachable upload endpoint with no auth in vulnerable configurations, but AC:H because exploitation requires a non-default chain (ext_in usage, original-filename move, web-root storage, PHP execution).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/codeigniter4/CodeIgniter4).

CVSS VectorVendor: https://github.com/codeigniter4/CodeIgniter4

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Impact

The ext_in upload validation rule checked the MIME-derived guessed extension instead of the client-provided filename extension. As a result, an uploaded file named shell.php containing GIF-like content could pass validation such as:

uploaded[avatar]|is_image[avatar]|mime_in[avatar,image/gif]|ext_in[avatar,gif]

because the detected MIME type maps to gif, even though the uploaded filename extension is php.

Applications are impacted if they:

  • accept user-controlled uploads,
  • rely on ext_in to validate the uploaded filename extension,
  • save uploaded files using the original client filename: $file->move($path),
  • store uploads in a web-accessible directory,
  • and allow PHP or other executable files to run from that directory.

In those conditions, this may lead to arbitrary code execution. The default application does not expose such an upload endpoint.

Patches

Upgrade to v4.7.3 or later.

Workarounds

  • Save uploads outside the public web root, preferably under writable/uploads
  • Use $file->store() or $file->move($path, $file->getRandomName()) instead of preserving the original filename
  • Disable script execution in any public upload directory
  • Manually verify the client filename extension before moving the file
  • Reject files when $file->getClientExtension() is not in the allowed list or does not match $file->guessExtension()

Resources

Executive ViewAI

Why It Matters

CodeIgniter4 versions prior to 4.7.3 contain a critical vulnerability allowing attackers to upload and execute arbitrary code on affected servers. Organizations using CodeIgniter4 for file uploads face immediate risk of complete system compromise, data theft, and operational disruption.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 77% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy