---
title: "CVE-2025-54418: CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability"
url: https://erroneo.us/security/cve/CVE-2025-54418/
description: "CVE-2025-54418 (codeigniter4/framework (Composer (PHP))): CodeIgniter is a PHP full-stack web framework. A command injection vulnerability present in…"
type: vulnerability-record
section: "Security Digest"
date_published: 2025-07-28
date_modified: 2025-07-28
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-54418"
kev: false
cvss: 9.8
epss: 0.01531
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-54418: CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 1.5% , percentile 75: FIRST’s model estimates a 1.5% chance of exploitation activity in the next 30 days, higher than 75% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes codeigniter4/framework (Composer (PHP)) < 4.6.2, fixed in 4.6.2 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- Composer (PHP) `codeigniter4/framework` < 4.6.2 → fixed: 4.6.2

## Affected products (CVE record)

- codeigniter4 CodeIgniter4: < 4.6.2

## Severity

- GitHub_M CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 1.53% probability of exploitation activity in the next 30 days; percentile 75.

## Sources

- [GitHub Advisory GHSA-9952-gv64-x94c](https://github.com/advisories/GHSA-9952-gv64-x94c)
- [CVE.org record CVE-2025-54418](https://www.cve.org/CVERecord?id=CVE-2025-54418)
- [NVD entry CVE-2025-54418](https://nvd.nist.gov/vuln/detail/CVE-2025-54418)
- [github.com](https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-9952-gv64-x94c)
- [github.com](https://github.com/codeigniter4/CodeIgniter4/commit/e18120bff1da691e1d15ffc1bf553ae7411762c0)
- [cwe.mitre.org](https://cwe.mitre.org/data/definitions/78.html)
- [owasp.org](https://owasp.org/www-community/attacks/Command_Injection)

---
Source page: https://erroneo.us/security/cve/CVE-2025-54418/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
