CVE-2025-54418CWE-78

CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability

Critical · published July 28, 2025

CVSS v3.1
9.8
EPSS
2%
Percentile
74.6
In the wild
Unconfirmed
What it is

🚨 CodeIgniter has a critical command injection vulnerability that can turn user-uploaded images into a hacker's playground! 🔥 Think of it like a restaurant where patrons can submit their own dish names. If the chef follows the name without checking, someone could request an absurdly dangerous dish that explodes in the kitchen! An attacker can exploit this by uploading a file with a malicious name or tricking the system with harmful text, leading to remote code execution. This could allow the attacker to take control of your server, manipulate data, or even compromise your entire application—absolutely devastating!

Put simply

Think of it like a restaurant where patrons can submit their own dish names. If the chef follows the name without checking, someone could request an absurdly dangerous dish that explodes in the kitchen! This vulnerability in CodeIgniter versions prior to 4.6.2 allows command injection via user-controlled filenames or text in the ImageMagick handler used for image processing, executing any commands included in the file or text.

What to do

An attacker can exploit this by uploading a file with a malicious name or tricking the system with harmful text, leading to remote code execution. This could allow the attacker to take control of your server, manipulate data, or even compromise your entire application—absolutely devastating! Upgrade to CodeIgniter version 4.6.2 or later immediately to patch this vulnerability. If you can't upgrade right away, switch to the GD image handler for processing images. For uploads, use random names generated with `getRandomName()`, and ensure any user-controlled text is sanitized to allow only safe characters. You've got this! Patch up your setup, and you'll be locking down your application in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01531 · 74.6th percentile
Weakness
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Published
2025-07-28T14:47Z
EPSS history
Timeline
  • 28 JUL 14:47Z
    CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability
    cvelistv5