Skip to content
Laskyr

codeigniter4/framework security advisory

CVE-2026-48062: CodeIgniter4 has a validation bypass when uploading file extensions via ext_in rule

CVE-2026-48062 is a critical-severity remote code execution vulnerability in the PHP package codeigniter4/framework (CVSS 9.8), published 17 July 2026. It is fixed in 4.7.2; earlier versions are affected. It can be exploited without an account.

critical 9.8 published 2026-07-17 · updated 2026-07-23

Fixed in codeigniter4/framework 4.7.2

This remote code execution issue affects codeigniter4/framework versions < 4.7.2. Upgrade to the fixed version for your release line (4.7.2). The newest release, 4.7.6, is not affected.

Affected versions
< 4.7.2
Fixed in
4.7.2
Newest release
4.7.6
Severity
Critical · CVSS 9.8
Type
Remote code execution
CWE-434
Exploited in the wild
Not on the CISA KEV list
checked 2026-11-04

The sources disagree on the fixed version. The CVE text names 4.7.3, while Packagist's advisory data, which composer audit checks, names 4.7.2 for the same release line. Upgrade to the higher of the two (4.7.3) to be safe by both.

Is your codeigniter4/framework version affected?

Run composer show codeigniter4/framework in your project, then enter the version. We check it against this and every other known codeigniter4/framework advisory.

Who can exploit CVE-2026-48062

CVSS vector (scored by GitHub): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Your app is only exposed if it uses the affected part of codeigniter4/framework. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-48062 in codeigniter4/framework

  1. Find the installed version: composer show codeigniter4/framework. If you never required it yourself, composer why codeigniter4/framework shows which package pulls it in.
  2. Update it: composer update codeigniter4/framework --with-all-dependencies. You need 4.7.2 or newer.
  3. If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example "codeigniter4/framework": "^4.7.2" if you can take that version), or upgrade the package that requires it.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-48062.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for remote code execution issues while the upgrade waits. None of it replaces the fix.

The CVE-2026-48062 advisory

CodeIgniter is a PHP full-stack web framework. Prior to 4.7.3, the ext_in upload validation rule in system/Validation/StrictRules/FileRules.php 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 with $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. This issue is fixed in version 4.7.3.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-48062. Advisory title: “CodeIgniter4 has a validation bypass when uploading file extensions via ext_in rule”.

References

Other codeigniter4/framework advisories

Related

Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.

Ask about a fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit