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
- 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
Is your codeigniter4/framework version affected?
Who can exploit CVE-2026-48062
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by GitHub): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
How to fix CVE-2026-48062 in codeigniter4/framework
- Find the installed version:
composer show codeigniter4/framework. If you never required it yourself,composer why codeigniter4/frameworkshows which package pulls it in. - Update it:
composer update codeigniter4/framework --with-all-dependencies. You need 4.7.2 or newer. - 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. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-48062. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- Never pass user-controlled data to unserialize() or to template rendering, and restrict who can edit templates or settings.
- Put a web application firewall in front of the app and watch for new PHP files or admin users.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
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.
References
- GitHub advisory GHSA-2gr4-ppc7-7mhx github.com
- Fix commit 2929934 github.com
- Release v4.7.3 github.com
Other codeigniter4/framework advisories
- critical CVE-2026-63223: CodeIgniter: Uploaded file extension validation bypass in is_image and mime_in rules 2026-08-07
- high CVE-2026-63222: CodeIgniter: Path traversal in UploadedFile::move() when using client-provided filenames 2026-08-07
- critical CVE-2026-63221: CodeIgniter: SQL injection in Query Builder deleteBatch() when used with where() conditions 2026-08-07
- medium CVE-2026-63220: CodeIgniter: Spoofable forwarded HTTPS headers in IncomingRequest::isSecure() 2026-08-07
- critical CVE-2025-54418: CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability 2025-07-28
- medium CVE-2025-24013: Missing validation of header name and value in codeigniter4/framework 2025-01-21
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 fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.