CVE-2026-77118

A heap out-of-bounds write exists in the Photo CD (PCD) decoder of GraphicsMagick. In DecodeImage() (coders/pcd.c), the Huffman delta loop advances its output pointer with q++ after every decoded delta and never checks it against the end of the heap-allocated luma/chroma plane buffers. The pointer is repositioned only when a sync marker introduces a new plane/row; between sync markers the run length is bounded solely by the input. A crafted PCD file that positions the pointer near the end of a plane and then supplies a long run of deltas with no intervening sync therefore walks the pointer past the end of the allocation and writes through it. Processing an untrusted PCD file — for example with gm convert or gm identify, or through any application linked against libGraphicsMagick — can corrupt heap memory beyond the buffers.
CVSS

No CVSS.

Configurations

No configuration.

History

27 Oct 2026, 10:10

Type Values Removed Values Added
Summary
  • (es) Existe una escritura fuera de límites en el heap en el decodificador de Photo CD (PCD) de GraphicsMagick. En DecodeImage() (coders/pcd.c), el bucle de delta de Huffman avanza su puntero de salida con q++ después de cada delta decodificado y nunca lo verifica contra el final de los búferes de plano de luma/croma asignados en el heap. El puntero se reposiciona solo cuando un marcador de sincronización introduce un nuevo plano/fila; entre marcadores de sincronización, la longitud de la ejecución está limitada únicamente por la entrada. Un archivo PCD manipulado que posiciona el puntero cerca del final de un plano y luego suministra una larga secuencia de deltas sin sincronización intermedia, por lo tanto, mueve el puntero más allá del final de la asignación y escribe a través de él. Procesar un archivo PCD no confiable - por ejemplo, con gm convert o gm identify, o a través de cualquier aplicación enlazada con libGraphicsMagick - puede corromper la memoria del heap más allá de los búferes.

Information

Published : 2026-08-20 13:19

Updated : 2026-10-27 10:10


NVD link : CVE-2026-77118

Mitre link : CVE-2026-77118

CVE.ORG link : CVE-2026-77118


JSON object : View

Products Affected

No product.

CWE
CWE-787

Out-of-bounds Write