CVE-2026-25638
Memory Leak in ImageMagick msl.c Causes Resource Exhaustion
Publication date: 2026-02-24
Last updated on: 2026-02-24
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| imagemagick | imagemagick | to 6.9.13-40 (exc) |
| imagemagick | imagemagick | From 7.0.0-0 (inc) to 7.1.2-15 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-401 | The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-25638 is a moderate severity memory leak vulnerability in the ImageMagick software, specifically in the msl encoder module.
The issue occurs in the WriteMSLImage function within the coders/msl.c source file, where resources are allocated but the function may return early without releasing these allocated resources.
This causes memory to be lost and unavailable for reuse, leading to a memory leak.
The vulnerability affects versions of ImageMagick prior to 7.1.2-15 and 6.9.13-40, which contain patches to fix this issue.
How can this vulnerability impact me? :
This vulnerability can be exploited remotely without any privileges or user interaction.
While it does not affect confidentiality or integrity, it can cause a low impact on availability by exhausting memory resources due to the memory leak.
This could lead to degraded performance or potential denial of service in systems using vulnerable versions of ImageMagick.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': "This vulnerability can be detected by monitoring for memory leaks in the ImageMagick software, specifically in the msl encoder module's WriteMSLImage function. Using memory analysis tools such as Valgrind's Memcheck can help identify definite memory loss caused by this issue."}, {'type': 'paragraph', 'content': 'A suggested command to detect the memory leak is running Valgrind on the ImageMagick process or test cases that invoke the msl encoder, for example:'}, {'type': 'list_item', 'content': 'valgrind --leak-check=full --show-leak-kinds=definite imagemagick_command [options]'}, {'type': 'paragraph', 'content': "Replace 'imagemagick_command [options]' with the actual ImageMagick command that triggers the use of the msl encoder. Valgrind will report memory leaks including the one caused by this vulnerability."}] [1]
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to upgrade ImageMagick to a patched version. Versions 7.1.2-15 and 6.9.13-40 contain fixes for this memory leak vulnerability.
Until the upgrade can be applied, monitoring system memory usage for unusual increases when using ImageMagick and limiting exposure to untrusted inputs that trigger the msl encoder can help reduce risk.