Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-9952-gv64-x94c
No affected components available
Impact
This vulnerability affects applications that:
- Use the ImageMagick handler for image processing (
imagickas 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
- Allow file uploads with user-controlled filenames and process uploaded images using the
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
Patches
Upgrade to v4.6.2 or later.
Workarounds
- 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 themove()method, or use thestore()method, which automatically generates safe filenames - For text operations: If you must use ImageMagick with user-controlled text, sanitize the input to only allow safe characters:
preg_replace('/[^a-zA-Z0-9\s.,!?-]/', '', $text)and validate/restrict text options
References
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a high impact on the availability of the system.
Active exploitation in the wild has been confirmed. Immediate patching or mitigation is required.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard