CVE-2026-31969

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. When reading data encoded using the `BYTE_ARRAY_STOP` method, an out-by-one error in the `cram_byte_array_stop_decode_char()` function check for a full output buffer could result in a single attacker-controlled byte being written beyond the end of a heap allocation. Exploiting this bug causes a heap buffer overflow. If a user opens a file crafted to exploit this issue, it could lead to the program crashing, or overwriting of data and heap structures in ways not expected by the program. It may be possible to use this to obtain arbitrary code execution. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:*
cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:*
cpe:2.3:a:htslib:htslib:1.23:*:*:*:*:*:*:*

History

17 Jun 2026, 10:34

Type Values Removed Values Added
Summary
  • (es) HTSlib es una biblioteca para leer y escribir formatos de archivo bioinformáticos. CRAM es un formato comprimido que almacena datos de alineación de secuencias de ADN utilizando una variedad de codificaciones y métodos de compresión. Al leer datos codificados usando el método 'BYTE_ARRAY_STOP', un error de uno de más en la comprobación de la función 'cram_byte_array_stop_decode_char()' para un búfer de salida lleno podría resultar en que un solo byte controlado por el atacante se escriba más allá del final de una asignación de memoria dinámica. Explotar este error causa un desbordamiento de búfer de heap. Si un usuario abre un archivo diseñado para explotar este problema, podría llevar a que el programa falle, o a la sobrescritura de datos y estructuras de heap de maneras no esperadas por el programa. Podría ser posible usar esto para obtener ejecución de código arbitrario. Las versiones 1.23.1, 1.22.2 y 1.21.1 incluyen correcciones para este problema. No hay solución alternativa para este problema.

19 Mar 2026, 13:59

Type Values Removed Values Added
First Time Htslib htslib
Htslib
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 8.1
CPE cpe:2.3:a:htslib:htslib:1.23:*:*:*:*:*:*:*
cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:*
References () https://github.com/samtools/htslib/commit/88cdf69e4b83bb550ab4f6f7134892c2ad1978f4 - () https://github.com/samtools/htslib/commit/88cdf69e4b83bb550ab4f6f7134892c2ad1978f4 - Patch
References () https://github.com/samtools/htslib/security/advisories/GHSA-q4cj-f4h5-fqgc - () https://github.com/samtools/htslib/security/advisories/GHSA-q4cj-f4h5-fqgc - Patch, Vendor Advisory

18 Mar 2026, 20:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-03-18 20:16

Updated : 2026-06-17 10:34


NVD link : CVE-2026-31969

Mitre link : CVE-2026-31969

CVE.ORG link : CVE-2026-31969


JSON object : View

Products Affected

htslib

  • htslib
CWE
CWE-122

Heap-based Buffer Overflow

CWE-787

Out-of-bounds Write