CodeIgniter4's ImageMagick Handler has Command Injection Vulnerability
Critical severity
GitHub Reviewed
Published
Jul 26, 2025
in
codeigniter4/CodeIgniter4
•
Updated Jul 28, 2025
Description
Published by the National Vulnerability Database
Jul 28, 2025
Published to the GitHub Advisory Database
Jul 28, 2025
Reviewed
Jul 28, 2025
Last updated
Jul 28, 2025
Impact
This vulnerability affects applications that:
imagick
as the image library)resize()
methodtext()
method with user-controlled text content or optionsAn attacker can:
Patches
Upgrade to v4.6.2 or later.
Workarounds
gd
, the default handler), which is not affected by either vulnerabilitygetRandomName()
when using themove()
method, or use thestore()
method, which automatically generates safe filenamespreg_replace('/[^a-zA-Z0-9\s.,!?-]/', '', $text)
and validate/restrict text optionsReferences
References