CVE-2025-54418 Details
Description
CodeIgniter is a PHP full-stack web framework. A command injection vulnerability present in versions prior to 4.6.2 affects applications that use the ImageMagick handler for image processing (`imagick` as the image library) and either allow file uploads with user-controlled filenames and process uploaded images using the `resize()` method or use the `text()` method with user-controlled text content or options. An attacker can upload a file with a malicious filename containing shell metacharacters that get executed when the image is processed or provide malicious text content or options that get executed when adding text to images Users should upgrade to v4.6.2 or later to receive a patch. As a workaround, switch to the GD image handler (`gd`, the default handler), which is not affected by either vulnerability. For file upload scenarios, instead of using user-provided filenames, generate random names to eliminate the attack vector with `getRandomName()` when using the `move()` method, or use the `store()` method, which automatically generates safe filenames. For text operations, if one must use ImageMagick with user-controlled text, sanitize the input to only allow safe characters and validate/restrict text options.
A command injection vulnerability has been identified in CodeIgniter versions prior to 4.6.2. This issue affects applications using the ImageMagick handler for image processing, specifically with the 'imagick' library. The vulnerability arises in scenarios that allow file uploads with user-controlled filenames, which are processed with the 'resize()' method, or when the 'text()' method is used with user-controlled text or options. An attacker could exploit this by uploading a file with a malicious filename containing shell metacharacters, which would be executed during image processing, or by providing harmful text content or options that are executed when text is added to images.
Users are advised to upgrade to CodeIgniter version 4.6.2 or later. If an immediate upgrade is not possible, switch to the GD image handler, which is not vulnerable to this issue. For applications that handle file uploads, use random filenames to avoid the injection vector, and for text operations, sanitize input to allow only safe characters.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 28, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| codeigniter codeigniter | >= 4.0.0, < 4.6.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 5, 2025 | Initial Analysis | [email protected] |
| Jul 28, 2025 | New CVE Received | [email protected] |