CVE-2025-54418
PHP vulnerability analysis and mitigation

Overview

A command injection vulnerability (CVE-2025-54418) was discovered in CodeIgniter, a PHP full-stack web framework, affecting versions 4.0.0 through 4.6.2. The vulnerability is present in applications that use the ImageMagick handler for image processing and either allow file uploads with user-controlled filenames that are processed using the resize() method, or use the text() method with user-controlled text content or options. The vulnerability was disclosed on July 28, 2025 (NVD, GitHub Advisory).

Technical details

The vulnerability allows attackers to execute arbitrary OS commands through shell metacharacters injected in filenames or text content. The issue stems from improper neutralization of special elements used in OS commands. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 CRITICAL (Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating a critical severity level with network attack vector, low attack complexity, and no required privileges or user interaction (GitHub Advisory).

Impact

If exploited, this vulnerability allows attackers to execute arbitrary operating system commands with the privileges of the vulnerable application. This could lead to complete system compromise, including unauthorized access to sensitive data, system modification, and potential service disruption (GitHub Advisory).

Mitigation and workarounds

Users should upgrade to CodeIgniter version 4.6.2 or later to receive the patch. As workarounds, users can switch to the GD image handler (gd, the default handler), which is not affected by the vulnerability. For file upload scenarios, instead of using user-provided filenames, generate random names using getRandomName() or use the store() method. For text operations with ImageMagick, input should be sanitized to only allow safe characters and text options should be validated and restricted (NVD, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-9v82-vcjx-m76jHIGH8.8
  • PHPPHP
  • shopware/core
NoYesSep 10, 2025
CVE-2025-56556MEDIUM6.5
  • PHPPHP
  • intelliants/subrion
NoNoSep 11, 2025
CVE-2025-58759MEDIUM5.1
  • PHPPHP
  • datahihi1/tiny-env
NoYesSep 09, 2025
CVE-2025-58758MEDIUM5.1
  • PHPPHP
  • datahihi1/tiny-env
NoYesSep 09, 2025
CVE-2025-10316LOW2.3
  • PHPPHP
  • lavitto/typo3-form-to-database
NoYesSep 16, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management