GHSA-mmj4-63m4-r6h5: CodeIgniter: Uploaded file extension validation bypass in `is_image` and `mime_in` rules

Published Aug 7, 2026
·
Updated

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 isimage or mimein without an independent safe extension check, such as extin 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().

Other sources

CodeIgniter: Uploaded file extension validation bypass in isimage and mimein rules

— Packagist

Affected Software

2 affected componentsFixes available
composer/codeigniter4/framework<4.7.4
4.7.4
composer/codeigniter4/framework<4.7.4
4.7.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/codeigniter4/framework to a version that resolves this vulnerability.

    Fixed in 4.7.4
  2. Upgrade

    Upgrade CodeIgniter to a version that resolves this vulnerability.

    Fixed in 4.7.4
  3. Configuration

    For exact MIME-type validation, reject files when $file->getClientExtension() does not match $file->guessExtension(); for image uploads, reject files when the client extension is not an allowed image extension, and use an independent safe extension check such as ext_in.

    CodeIgniter upload validation independent safe extension validation = reject mismatches
  4. Configuration

    Disable script execution in any public upload directory.

    Public upload directories script execution = disabled
  5. Configuration

    Save uploads outside the public web root, preferably under writable/uploads.

    Uploaded files storage location = outside the public web root
  6. Configuration

    Use $file->store() or $file->move($path, $file->getRandomName()) instead of preserving the original client filename; manually verify the client filename extension before moving the file.

    Uploaded files filename = random generated filename

Event History

Aug 7, 2026
Advisory Published
via GitHub·06:24 PM
Data Sourced
via GitHub·06:24 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·06:24 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of GHSA-mmj4-63m4-r6h5?

The severity of GHSA-mmj4-63m4-r6h5 is critical with a score of 9.8.

2

How do I fix GHSA-mmj4-63m4-r6h5?

To fix GHSA-mmj4-63m4-r6h5, ensure that file uploads are validated with both safe extension checks and appropriate MIME type checks.

3

What happens if GHSA-mmj4-63m4-r6h5 is exploited?

Exploiting GHSA-mmj4-63m4-r6h5 can lead to remote code execution on the vulnerable application.

4

Which software is affected by GHSA-mmj4-63m4-r6h5?

The vulnerability GHSA-mmj4-63m4-r6h5 affects the composer/codeigniter4/framework software.

5

What type of vulnerability is GHSA-mmj4-63m4-r6h5 categorized as?

GHSA-mmj4-63m4-r6h5 is categorized as a Malicious File Upload vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203