{"id":"CVE-2025-62171","published":"2025-10-17T16:30:27Z","modified":"2025-11-03T17:45:24Z","title":"ImageMagick vulnerable to denial of service via integer overflow in BMP decoder on 32-bit systems","vendor":"ImageMagick","product":"ImageMagick","tier":"tail","description":{"text":"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 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00814,"percentile":0.5399,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9pp9-cfwx-54rm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ImageMagick/ImageMagick/commit/cea1693e2ded51b4cc91c70c54096cbed1691c00","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00019.html","tags":[]}],"priority":{"score":14.9,"factors":[{"name":"EPSS percentile","points":10.8},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"imagemagick","affectedVersions":[{"vendor":"ImageMagick","product":"ImageMagick","versions":["< 6.9.13-32",">= 7.0.0-0, < 7.1.2-7"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-10-17T17:05:36.358600Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"NuGet","package":"Magick.NET-Q16-AnyCPU","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-AnyCPU","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x86","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q16-x86","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q8-AnyCPU","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"},{"ecosystem":"NuGet","package":"Magick.NET-Q8-x86","vulnerableRanges":["<14.9.0"],"patched":["14.9.0"],"from":["GHSA-9pp9-cfwx-54rm"],"provenance":"source"}],"summary":{"text":"The flaw is an integer overflow in the BMP decoder (coders/bmp.c) of ImageMagick, which affects only 32-bit builds where default width, height, and area resource limits have been manually raised. An attacker who supplies a specially crafted BMP file can cause a denial of service by making the bytes-per-line calculation overflow to zero, and exploitation requires that the target processes the file with such a configuration, with no authentication or user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:30:36Z"},"euvd":{"id":"EUVD-2025-34893","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-imagemagick-cve-2025-57803","parents":[{"from":"CVE-2025-57803","to":"CVE-2025-62171","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"The overflow check added to address CVE-2025-57803 is placed after the overflow occurs, making it ineffective.","from":"CVE.org","in":"CVE-2025-62171"},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-AnyCPU","fromFixed":"14.8.1","toFixed":"14.9.0","daysApart":52},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-HDRI-AnyCPU","fromFixed":"14.8.1","toFixed":"14.9.0","daysApart":52},{"kind":"same-code","provenance":"machine","files":["coders/bmp.c"],"commits":["https://github.com/ImageMagick/ImageMagick/commit/2c55221f4d38193adcb51056c14cf238fbcc35d7","https://github.com/ImageMagick/ImageMagick/commit/cea1693e2ded51b4cc91c70c54096cbed1691c00"],"basis":"shared file"}]}],"packageHistory":[{"cve":"CVE-2025-55212","published":"2025-08-26","fixed":"14.8.1","kev":false},{"cve":"CVE-2025-55298","published":"2025-08-26","fixed":"14.8.1","kev":false},{"cve":"CVE-2025-57803","published":"2025-08-26","fixed":"14.8.1","kev":false},{"cve":"CVE-2025-62171","published":"2025-10-17","fixed":"14.9.0","kev":false},{"cve":"CVE-2025-66628","published":"2025-12-10","fixed":"14.10.0","kev":false,"link":{"from":"CVE-2025-62171","to":"CVE-2025-66628","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-AnyCPU","fromFixed":"14.9.0","toFixed":"14.10.0","daysApart":54},{"kind":"version-step","provenance":"source","package":"NuGet:Magick.NET-Q16-HDRI-AnyCPU","fromFixed":"14.9.0","toFixed":"14.10.0","daysApart":54}]}},{"cve":"CVE-2025-68618","published":"2025-12-30","fixed":"14.10.1","kev":false},{"cve":"CVE-2025-68950","published":"2025-12-30","fixed":"14.10.1","kev":false}],"package":"NuGet:Magick.NET-Q16-AnyCPU"}}