Skip to content

CodeIgniter: Uploaded file extension validation bypass in `is_image` and `mime_in` rules

Critical severity GitHub Reviewed Published Jul 7, 2026 in codeigniter4/CodeIgniter4 • Updated Aug 7, 2026

Package

composer codeigniter4/framework (Composer)

Affected versions

< 4.7.4

Patched versions

4.7.4

Description

Impact

This is an unsafe file upload validation vulnerability that can lead to remote code execution in vulnerable application configurations.

Applications are impacted when they:

  • validate uploads using is_image or mime_in without an independent safe extension check, such as ext_in on patched versions
  • save uploaded files using the client-supplied filename
  • place uploads in a web-accessible directory where PHP files can execute

Patches

Upgrade to v4.7.4 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 client filename.
  • Disable script execution in any public upload directory.
  • Manually verify the client filename extension before moving the file.
  • For image uploads, reject files when $file->getClientExtension() is not an allowed image extension.
  • For exact MIME-type validation, reject files when $file->getClientExtension() does not match $file->guessExtension().

References

@paulbalandan paulbalandan published to codeigniter4/CodeIgniter4 Jul 7, 2026
Published by the National Vulnerability Database Jul 31, 2026
Published to the GitHub Advisory Database Aug 7, 2026
Reviewed Aug 7, 2026
Last updated Aug 7, 2026

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(53rd percentile)

Weaknesses

Unrestricted Upload of File with Dangerous Type

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. Learn more on MITRE.

CVE ID

CVE-2026-63223

GHSA ID

GHSA-mmj4-63m4-r6h5

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.