Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify CodeIgniter4 app with public upload endpoint
-
DeliveryCraft GIF/PHP polyglot named shell.php
-
ExploitPOST file through ext_in-validated form
-
InstallValidation passes on MIME-derived extension
-
C2File written to web root with original name
-
ExecuteRequest /uploads/shell.php to trigger PHP execution
-
ImpactObtain 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 |
| 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), |
| Exploit ScenarioDerived | An unauthenticated attacker visits a CodeIgniter4 application's avatar/profile-picture upload endpoint and submits a polyglot file named |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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).
Primary rating from Vendor (https://github.com/codeigniter4/CodeIgniter4).
CVSS VectorVendor: https://github.com/codeigniter4/CodeIgniter4
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_into 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
Articles & Coverage 1
Executive ViewAI
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
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
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
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
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
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
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
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-45325
GHSA-2gr4-ppc7-7mhx
NVD
CVE.org
EPSS
Exploit-DB