Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2025-57803

Опубликовано: 26 авг. 2025
Источник: redhat
CVSS3: 7.5
EPSS Низкий

Описание

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-28 and 7.1.2-2 for ImageMagick's 32-bit build, a 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses bytes_per_line (stride) to a tiny value while the per-row writer still emits 3 × width bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines. This issue has been patched in versions 6.9.13-28 and 7.1.2-2.

A flaw was found in ImageMagick. In 32-bit builds, the Bitmap encoder miscalculates the stride value when processing images with very large with. Mathematically, the stride value is calculated as width multiplied by 3 but the theoretical limit of such value is 2^32 for 32-bit integers. So, if this value is exceeded, the encoder uses modulo to convert it down and then takes the smaller value as the actual stride length. This is problematic because the pixel data starts to overlap when being added to the buffer due to the small stride value messing up the rows. This heap buffer overflow allows an attacker to cause a denial of service or, with crafted input, potentially execute arbitrary code.

Отчет

This vulnerability is specific to 32-bit ImageMagick builds. Red Hat predominantly only ships 64-bit builds of Kea on its platforms and so the vulnerability affects only customers that install i686 arch rpm packages as these are the only 32-bit builds Red Hat provides. The flaw occurs in the WriteBMPImage function when computing bytes_per_line for 24-bpp BMP images. An integer overflow causes the stride to underflow to a small value, while the writer still emits 3 × width bytes per row. The mismatch immediately produces a large, attacker-controlled heap overwrite.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 6ImageMagickWill not fix
Red Hat Enterprise Linux 7 Extended Lifecycle SupportImageMagickFixedRHSA-2025:1631322.09.2025

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-122
Дефект:
CWE-190
https://bugzilla.redhat.com/show_bug.cgi?id=2391093imagemagick: ImageMagick (WriteBMPImage): 32-bit integer overflow when writing BMP scanline stride → heap buffer overflow

EPSS

Процентиль: 21%
0.00068
Низкий

7.5 High

CVSS3

Связанные уязвимости

CVSS3: 7.5
ubuntu
2 месяца назад

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-28 and 7.1.2-2 for ImageMagick's 32-bit build, a 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses bytes_per_line (stride) to a tiny value while the per-row writer still emits 3 × width bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines. This issue has been patched in versions 6.9.13-28 and 7.1.2-2.

CVSS3: 7.5
nvd
2 месяца назад

ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-28 and 7.1.2-2 for ImageMagick's 32-bit build, a 32-bit integer overflow in the BMP encoder’s scanline-stride computation collapses bytes_per_line (stride) to a tiny value while the per-row writer still emits 3 × width bytes for 24-bpp images. The row base pointer advances using the (overflowed) stride, so the first row immediately writes past its slot and into adjacent heap memory with attacker-controlled bytes. This is a classic, powerful primitive for heap corruption in common auto-convert pipelines. This issue has been patched in versions 6.9.13-28 and 7.1.2-2.

CVSS3: 7.5
debian
2 месяца назад

ImageMagick is free and open-source software used for editing and mani ...

CVSS3: 8.8
redos
2 месяца назад

Уязвимость ImageMagick7

CVSS3: 8.8
redos
2 месяца назад

Уязвимость ImageMagick

EPSS

Процентиль: 21%
0.00068
Низкий

7.5 High

CVSS3