Cyber Resilience

CVE-2025-62171

Memory Safety in Imagemagick ≤ 6.9.13-32

Public PoCMemory Safety
Published
17 October 2025
Modified
03 November 2025
Patch / advisory
CVSS Score v3.1 5.9
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0076 51th percentile
Risk Priority 35 floored blend · peak EPSS

Summary

CVE-2025-62171 is a medium-severity Integer Overflow or Wraparound (CWE-190) vulnerability in Imagemagick Imagemagick. Its CVSS base score is 5.9 (Medium).

Operationally, ranked in the top 49% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to CM-6 (Configuration Settings) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

ImageMagick is an open source software suite for displaying, converting, and editing raster image files. In ImageMagick versions prior to 7.1.2-7 and 6.9.13-32, an integer overflow vulnerability exists in the BMP decoder on 32-bit systems. The vulnerability occurs in coders/bmp.c…

more

when calculating the extent value by multiplying image columns by bits per pixel. On 32-bit systems with size_t of 4 bytes, a malicious BMP file with specific dimensions can cause this multiplication to overflow and wrap to zero. The overflow check added to address CVE-2025-57803 is placed after the overflow occurs, making it ineffective. A specially crafted 58-byte BMP file with width set to 536,870,912 and 32 bits per pixel can trigger this overflow, causing the bytes_per_line calculation to become zero. This vulnerability only affects 32-bit builds of ImageMagick where default resource limits for width, height, and area have been manually increased beyond their defaults. 64-bit systems with size_t of 8 bytes are not vulnerable, and systems using default ImageMagick resource limits are not vulnerable. The vulnerability is fixed in versions 7.1.2-7 and 6.9.13-32.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

Insufficient information to map techniques.
Confidence: LOW · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2026-56363Same product: Imagemagick Imagemagick
CVE-2025-55154Same product: Imagemagick Imagemagick
CVE-2026-33900Same product: Imagemagick Imagemagick
CVE-2025-69204Same product: Imagemagick Imagemagick
CVE-2026-28493Same product: Imagemagick Imagemagick
CVE-2026-25970Same product: Imagemagick Imagemagick
CVE-2025-57803Same product: Imagemagick Imagemagick
CVE-2026-25897Same product: Imagemagick Imagemagick
CVE-2026-30935Same product: Imagemagick Imagemagick
CVE-2026-53466Same product: Imagemagick Imagemagick

Affected Assets

imagemagick
imagemagick
≤ 6.9.13-32 · 7.0.0-0 — 7.1.2-7

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)
  • SI-10 Information Input Validation
  • CM-6 Configuration Settings
Detect
Catch it (NIST detect / respond)
  • SI-7 Software, Firmware, and Information Integrity
Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V5.2.6

Mitigating Controls (NIST 800-53 r5) AI

prevent

Directly enforces validation of BMP image dimensions and pixel depth before arithmetic operations that trigger the integer overflow in coders/bmp.c.

prevent

Requires maintaining default resource limits for width/height/area so the vulnerable 32-bit overflow path is never reached.

detect

Performs integrity checks on image data or decoder output that can identify anomalous results from the wrap-to-zero bytes_per_line calculation.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require use of safe arithmetic, bounds checks, and testing that prevent integer overflows.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing in development can detect integer overflows before release.

prevents

Secure SDLC mandates input validation and arithmetic checks that prevent integer overflows.

degrades

Application security requirements include bounds checking and safe arithmetic to avoid overflow conditions.

degrades

Secure architecture principles require defensive coding patterns that mitigate integer wraparound risks.

prevents

Secure coding standards explicitly forbid unsafe integer operations and mandate overflow-safe constructs.

References