← Back to CVE Explorer

CVE-2026-62291

Full vulnerability record from the local CVENow database.

Description

libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.

Severity
MEDIUM
CVSS score
5.3 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-08-18 22:17:02.877000
Last modified
2026-10-22 16:09:59.560000
View original CVE JSON
{
  "id": "CVE-2026-62291",
  "sourceIdentifier": "[email protected]",
  "published": "2026-08-18T22:17:02.877",
  "lastModified": "2026-10-22T16:09:59.560",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1."
    },
    {
      "lang": "es",
      "value": "libheif es un decodificador y codificador de formato de archivo HEIF y AVIF. En la versión 1.23.0 y anteriores, una secuencia de imagen manipulada con un plano primario de 2x2 y un plano alfa auxiliar de 256x256 puede causar corrupción de pila controlada por el atacante durante un flujo de trabajo normal de decodificación y recodificación. Track_Visual::decode_next_image_sample() llama a transfer_channel_from_image_as() sin verificar que las dimensiones del alfa auxiliar coincidan con el fotograma principal. La imagen inconsistente resultante llega a heif_track_decode_next_image() y luego a heif_context_encode_image(). En unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() dimensiona su búfer con compute_tile_data_size_bytes() utilizando las dimensiones primarias, pero copia cada componente utilizando sus dimensiones de plano reales. El plano alfa sobredimensionado es, por lo tanto, copiado más allá de la asignación, causando una escritura fuera de límites; la discrepancia de tamaño inversa también puede producir una lectura fuera de límites. Este problema está corregido en la versión 1.23.1."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "strukturag",
          "product": "libheif",
          "versions": [
            {
              "version": "< 1.23.1",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L",
          "baseScore": 5.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "LOW"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.4
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-08-21T19:08:04.109354Z",
          "id": "CVE-2026-62291",
          "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-125"
        },
        {
          "lang": "en",
          "value": "CWE-787"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/strukturag/libheif/commit/ac5521ad50399885de96bb6a0733a5d2442740f9",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/strukturag/libheif/releases/tag/v1.23.1",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/strukturag/libheif/security/advisories/GHSA-xpw3-9rhw-482x",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/strukturag/libheif/security/advisories/GHSA-xpw3-9rhw-482x",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}