CVE-2026-25796
JSON

5.3medium

ImageMagick has memory leak of watermark Image object in ReadSTEGANOImage on multiple error/early-return paths

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.57% (higher than 41% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-g2pr-qxjg-7r2w

Description

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, in `ReadSTEGANOImage()` (`coders/stegano.c`), the `watermark` Image object is not freed on three early-return paths, resulting in a definite memory leak (~13.5KB+ per invocation) that can be exploited for denial of service. Versions 7.1.2-15 and 6.9.13-40 contain a patch.

Affected

Product or packageVersionsReported by
ImageMagick ImageMagick>= 7.0.0, < 7.1.2-15, < 6.9.13-40, before 6.9.13-40, from 7.0.0-0 before 7.1.2-15CVE List, NVD
Magick.NET-Q16-AnyCPU (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-AnyCPU (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-OpenMP-arm64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-OpenMP-x64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-arm64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-x64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-HDRI-x86 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-OpenMP-arm64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-OpenMP-x64 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-OpenMP-x86 (NuGet)before 14.10.3GitHub Advisory Database
Magick.NET-Q16-arm64 (NuGet)before 14.10.3GitHub Advisory Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-401

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, in `ReadSTEGANOImage()` (`coders/stegano.c`), the `watermark` Image object is not freed on three early-return paths, resulting in a definite memory leak (~13.5KB+ per invocation) that can be exploited for denial of service. Versions 7.1.2-15 and 6.9.13-40 contain a patch.

GitHub Advisory Database
Summary

In ReadSTEGANOImage() (coders/stegano.c), the watermark Image object is not freed on three early-return paths, resulting in a definite memory leak (~13.5KB+ per invocation) that can be exploited for denial of service.

Direct leak of 13512 byte(s) in 1 object(s) allocated from:
    #0 0x7f5c11e27887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55cdc38f65c4 in AcquireMagickMemory MagickCore/memory.c:536
    #2 0x55cdc38f65eb in AcquireCriticalMemory MagickCore/memory.c:612
    #3 0x55cdc3899e91 in AcquireImage MagickCore/image.c:154
NVD (es)

ImageMagick es un software libre y de código abierto utilizado para editar y manipular imágenes digitales. Antes de las versiones 7.1.2-15 y 6.9.13-40, en 'ReadSTEGANOImage()' ('coders/stegano.c'), el objeto de imagen 'watermark' no se libera en tres rutas de retorno anticipado, lo que resulta en una fuga de memoria definida (~13.5KB+ por invocación) que puede ser explotada para denegación de servicio. Las versiones 7.1.2-15 y 6.9.13-40 contienen un parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-25796 changed 2026-02-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-g2pr-qxjg-7r2w changed 2026-02-24CC-BY-4.0
NVDCVE-2026-25796 changed 2026-06-17Public domain