Skip to main content

CodeIgniter4 CVE-2026-48062

| EUVDEUVD-2026-45325 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
Share

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 11, 2026 - 17:45 vuln.today
Analysis Generated
Jun 11, 2026 - 17:45 vuln.today

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

AnalysisAI

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).

Technical ContextAI

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.

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.

More in PHP

View all
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-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

CVE-2024-46506 CRITICAL POC
10.0 May 13

NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro

CVE-2024-8353 CRITICAL POC
9.8 Sep 28

The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all

Share

CVE-2026-48062 vulnerability details – vuln.today

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