CVSS Score: 9.8 Published: 2025-07-28 Full Report: https://cvereports.com/reports/CVE-2025-54418
A critical OS Command Injection vulnerability in CodeIgniter 4's ImageMagick handler allows unauthenticated attackers to achieve Remote Code Execution (RCE) via malicious filenames or text overlays.
CodeIgniter 4 versions before 4.6.2 failed to sanitize inputs when wrapping the ImageMagick CLI. By uploading an image with a carefully crafted filename or using the text overlay feature, an attacker can break out of the command string and execute arbitrary shell commands on the server.
- CWE ID: CWE-78 (OS Command Injection)
- CVSS v3.1: 9.8 (Critical)
- Attack Vector: Network
- Privileges Required: None
- User Interaction: None
- Impact: Remote Code Execution (RCE)
- CodeIgniter 4 Framework
- CodeIgniter 4: < 4.6.2 (Fixed in:
4.6.2)
- Upgrade to CodeIgniter 4.6.2 or later
- Switch Image Handler from 'imagick' to 'gd'
- Force random filenames for all uploads
- Sanitize all user input passed to image processing text functions
Remediation Steps:
- Check
app/Config/Images.phpto see if$handleris set toimagick. - If using
imagick, runcomposer updateto pull the latest framework version. - Verify the update by checking
system/Images/Handlers/ImageMagickHandler.phpforescapeshellarg()usage.
Generated by CVEReports - Automated Vulnerability Intelligence