← Back to CVE Explorer

CVE-2025-62171

Full vulnerability record from the local CVENow database.

Description

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.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Modified
Source identifier
Published
2025-10-17 17:15:49.197000
Last modified
2026-10-19 16:10:00.260000
View original CVE JSON
{
  "id": "CVE-2025-62171",
  "sourceIdentifier": "[email protected]",
  "published": "2025-10-17T17:15:49.197",
  "lastModified": "2026-10-19T16:10:00.260",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "ImageMagick es una suite de software de código abierto para mostrar, convertir y editar archivos de imagen ráster. En las versiones de ImageMagick anteriores a la 7.1.2-7 y 6.9.13-32, existe una vulnerabilidad de desbordamiento de entero en el decodificador BMP en sistemas de 32 bits. La vulnerabilidad ocurre en coders/bmp.c al calcular el valor de extensión multiplicando las columnas de la imagen por los bits por píxel. En sistemas de 32 bits con size_t de 4 bytes, un archivo BMP malicioso con dimensiones específicas puede causar que esta multiplicación se desborde y se ajuste a cero. La comprobación de desbordamiento añadida para abordar CVE-2025-57803 se coloca después de que ocurre el desbordamiento, lo que la hace ineficaz. Un archivo BMP de 58 bytes especialmente diseñado con un ancho establecido en 536,870,912 y 32 bits por píxel puede desencadenar este desbordamiento, haciendo que el cálculo de bytes_per_line se convierta en cero. Esta vulnerabilidad solo afecta a las compilaciones de 32 bits de ImageMagick donde los límites de recursos predeterminados para ancho, alto y área se han aumentado manualmente más allá de sus valores predeterminados. Los sistemas de 64 bits con size_t de 8 bytes no son vulnerables, y los sistemas que utilizan los límites de recursos predeterminados de ImageMagick no son vulnerables. La vulnerabilidad está corregida en las versiones 7.1.2-7 y 6.9.13-32."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "ImageMagick",
          "product": "ImageMagick",
          "versions": [
            {
              "version": "< 6.9.13-32",
              "status": "affected"
            },
            {
              "version": ">= 7.0.0-0, < 7.1.2-7",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 5.9,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "HIGH",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.2,
        "impactScore": 3.6
      },
      {
        "source": "[email protected]",
        "type": "Primary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2025-10-17T17:05:36.358600Z",
          "id": "CVE-2025-62171",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-190"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*",
              "versionEndExcluding": "6.9.13-32",
              "matchCriteriaId": "EB78F6C2-7C33-4A0A-A093-6A26A8B9C3BF"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "7.0.0-0",
              "versionEndExcluding": "7.1.2-7",
              "matchCriteriaId": "5F3152BE-0219-45B9-940F-86EED0E01510"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/ImageMagick/ImageMagick/commit/cea1693e2ded51b4cc91c70c54096cbed1691c00",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-9pp9-cfwx-54rm",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00019.html",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    }
  ]
}