CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| codeigniter4 | CodeIgniter4 | before 4.6.2 | 4.6.2 | Patch available | CNA |
| — | codeigniter4/framework (Packagist) | before 4.6.2 | 4.6.2 | Patch available | GHSA-9952-gv64-x94c |
- CodeIgniter4 Vendorcodeigniter4 Affected before 4.6.2 Fixed in 4.6.2 Patch available CNA
- codeigniter4/framework (Packagist) Vendor— Affected before 4.6.2 Fixed in 4.6.2 Patch available GHSA-9952-gv64-x94c
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:* | 4.0.0 to before 4.6.2 | Vulnerable | codeigniter4 |
- cpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:* Versions 4.0.0 to before 4.6.2 Vulnerable ·codeigniter4
Remediation
- Fix · CNA CodeIgniter4 (codeigniter4) Fixed in 4.6.2
- Fix · GHSA-9952-gv64-x94c codeigniter4/framework (Packagist) Fixed in 4.6.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-54418
- 2026-10-03 Alias added: GHSA-9952-gv64-x94c
References
Advisory 2
More codeigniter4 Codeigniter vulnerabilities
- TI-2014-07135 CodeIgniter before 3.0 and Kohana 3.2.3 and earlier and 3.3.x through 3.3.2 make it… CVSS 3.0CRITICAL 9.8
- TI-2022-16370 SameSite may allow cross-site request forgery (CSRF) protection to be bypassed CVSS 3.1HIGH 8.8
- TI-2022-06025 Deserialization of Untrusted Data in Codeigniter4 CVSS 3.1CRITICAL 9.8
- TI-2024-27591 A Cross-Site Request Forgery (CSRF) in Codeigniter 3.1.13 allows attackers to arbitrarily… CVSS 3.1HIGH 7.5
- TI-2014-07136 CodeIgniter before 2.2.0 makes it easier for attackers to decode session cookies by… CVSS 3.0CRITICAL 9.8
- TI-2024-19671 CodeIgniter4 Language class DoS Vulnerability CVSS 3.1HIGH 7.5
Sources
- CVE-2025-54418 · CVE Program
- CVE-2025-54418 · NVD
- FIRST EPSS
- GHSA-9952-gv64-x94c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences