CVE-2025-54418
CVE-2025-54418 is a critical-severity vulnerability in Codeigniter with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-78.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- EPSS exploit prediction: 2% (71st percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-22914
- Weakness: CWE-78
- Affected product: Codeigniter
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2025-54418?
- 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.
- How severe is CVE-2025-54418?
- CVE-2025-54418 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2025-54418 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (71st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-54418?
- CVE-2025-54418 affects Codeigniter. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-54418?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2025-54418 have an EU (EUVD) identifier?
- Yes. CVE-2025-54418 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-22914.
- When was CVE-2025-54418 published?
- CVE-2025-54418 was published on 2025-07-28 and last updated on 2026-06-17.
References
- https://cwe.mitre.org/data/definitions/78.html
- https://github.com/codeigniter4/CodeIgniter4/commit/e18120bff1da691e1d15ffc1bf553ae7411762c0
- https://github.com/codeigniter4/CodeIgniter4/security/advisories/GHSA-9952-gv64-x94c
- https://owasp.org/www-community/attacks/Command_Injection
Affected products (1)
- cpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:*
More vulnerabilities in Codeigniter
- CVE-2023-32692 — Critical (CVSS 9.8): CodeIgniter is a PHP full-stack web framework. This vulnerability allows attackers to execute arbitrary code when you…
- CVE-2022-40835 — Critical (CVSS 9.8): B.C. Institute of Technology CodeIgniter <=3.1.13 is vulnerable to SQL Injection via…
- CVE-2022-40834 — Critical (CVSS 9.8): B.C. Institute of Technology CodeIgniter <=3.1.13 is vulnerable to SQL Injection via…
- CVE-2022-40833 — Critical (CVSS 9.8): B.C. Institute of Technology CodeIgniter <=3.1.13 is vulnerable to SQL Injection via…
- CVE-2022-40832 — Critical (CVSS 9.8): B.C. Institute of Technology CodeIgniter <=3.1.13 is vulnerable to SQL Injection via…
- CVE-2022-40831 — Critical (CVSS 9.8): B.C. Institute of Technology CodeIgniter <=3.1.13 is vulnerable to SQL Injection via…
All CVEs affecting Codeigniter →
Other CWE-78 (OS Command Injection) vulnerabilities
- CVE-2026-56004 — Critical (CVSS 10.0): A shellcode injection in the mercurial handler of the obs tar_scm source service before version 0.12.4 could be used by…
- CVE-2026-56415 — Critical (CVSS 10.0): Storage Concentrator (SC & SCVM) contains a command injection vulnerability within the debug.pl script that is…
- CVE-2026-56413 — Critical (CVSS 10.0): Storage Concentrator (SC & SCVM) contains a command injection vulnerability in the ms_service.pl service, which listens…
- CVE-2026-49869 — Critical (CVSS 10.0): Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, AuthenticationFilter in…
- CVE-2026-49261 — Critical (CVSS 10.0): MariaDB server is a community developed fork of MySQL server. Versions 10.6.1 through 10.6.26, 10.11.1 through…
- CVE-2026-10520 — Critical (CVSS 10.0): An OS Command Injection vulnerability in Ivanti Sentry before the R10.5.2, R10.6.2 and R10.7.1 versions allows a…