CVE-2026-63223: CodeIgniter: Uploaded file extension validation bypass in `is_image` and `mime_in` rules
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 is a PHP full-stack web framework. Prior to 4.7.4, the isimage and mimein upload validation rules do not independently enforce a safe client filename extension, allowing a remote attacker to upload executable content when an application preserves the client filename and stores uploads in a web-accessible script-enabled directory. 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, and place uploads in a web-accessible directory where PHP files can execute. This issue is fixed in version 4.7.4.
— MITRE
CodeIgniter: Uploaded file extension validation bypass in isimage and mimein rules
— Packagist
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/codeigniter4/frameworkto a version that resolves this vulnerability.Fixed in 4.7.4 - Upgrade
Upgrade
CodeIgniterto a version that resolves this vulnerability.Fixed in 4.7.4 - Configuration
Disable script execution in any public upload directory.
Upload directories script execution = disabled - Configuration
Independently validate the client filename extension: reject files when $file->getClientExtension() does not match $file->guessExtension(); for image uploads, reject extensions that are not allowed image extensions. Manually verify the client filename extension before moving the file.
Upload validation safe client filename extension validation = enabled - Configuration
Save uploads outside the public web root, preferably under writable/uploads.
Upload storage upload directory = outside the public web root - Configuration
Use $file->store() or $file->move($path, $file->getRandomName()) instead of preserving the original client filename.
Upload storage stored filename = randomized
Event History
Frequently Asked Questions
What is the severity of CVE-2026-63223?
CVE-2026-63223 has a critical severity score of 9.8.
What vulnerability does CVE-2026-63223 describe?
CVE-2026-63223 describes a vulnerability in CodeIgniter allowing file extension validation bypass for uploaded files.
How do I fix CVE-2026-63223?
To fix CVE-2026-63223, upgrade CodeIgniter to version 4.7.4 or later.
What is the impact of CVE-2026-63223?
CVE-2026-63223 could allow a remote attacker to upload malicious executable files due to improper validation.
Which CodeIgniter versions are affected by CVE-2026-63223?
CVE-2026-63223 affects all versions of CodeIgniter prior to 4.7.4.