Loading...
Skip to main content

CVE-2026-48062 — Vulnerability in codeigniter4/framework — CVE Details

CRITICAL

CodeIgniter4 has a validation bypass when uploading file extensions via `ext_in` rule

Published June 11, 2026Updated September 10, 2026Source: osv

Summary

### 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 - [CodeIgniter4 uploaded files documentation](https://codeigniter.com/user_guide/libraries/uploaded_files.html#moving-files) - [CodeIgniter4 file upload validation documentation](https://codeigniter.com/user_guide/libraries/validation.html#rules-for-file-uploads) - [CWE-434: Unrestricted Upload of File with Dangerous Type](https://cwe.mitre.org/data/definitions/434.html) - [OWASP File Upload Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html)

Advisory Timeline

  • First published June 11, 2026 (123 days ago).
  • Last revised September 10, 2026 — 90 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update codeigniter4/framework to 4.7.3 or later
composer require "codeigniter4/framework:^4.7.3"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
codeigniter4/framework
packagist
4.0.0, 4.0.0-rc.4, v4.0.0-alpha.3, v4.0.0-alpha.4 (+73 more)4.7.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-434
    Unrestricted File UploadMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-48062?
CodeIgniter4 has a validation bypass when uploading file extensions via `ext_in` rule This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-48062?
CVE-2026-48062 affects codeigniter4/framework. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-48062 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-2gr4-ppc7-7mhx

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies