CVE-2026-31963

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. As one method of removing redundant data, CRAM uses reference-based compression so that instead of storing the full sequence for each alignment record it stores a location in an external reference sequence along with a list of differences to the reference at that location as a sequence of "features". When decoding these features, an out-by-one error in a test for CRAM features that appear beyond the extent of the CRAM record sequence could result in an invalid write of one attacker-controlled byte beyond the end of a heap buffer. 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 de bioinformática. CRAM es un formato comprimido que almacena datos de alineación de secuencias de ADN. Como un método para eliminar datos redundantes, CRAM utiliza compresión basada en referencias de modo que, en lugar de almacenar la secuencia completa para cada registro de alineación, almacena una ubicación en una secuencia de referencia externa junto con una lista de diferencias con la referencia en esa ubicación como una secuencia de 'features'. Al decodificar estas 'features', un error por uno en una prueba para 'features' de CRAM que aparecen más allá del alcance de la secuencia de registro de CRAM podría resultar en una escritura inválida de un byte controlado por el atacante más allá del final de un búfer de pila. Explotar este error causa un desbordamiento de búfer de pila. Si un usuario abre un archivo diseñado para explotar este problema, podría provocar el bloqueo del programa o la sobrescritura de datos y estructuras de pila de formas 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, 14:50

Type Values Removed Values Added
References () https://github.com/samtools/htslib/commit/8bcc9907be0f945ddc31796d64f078fa05456acd - () https://github.com/samtools/htslib/commit/8bcc9907be0f945ddc31796d64f078fa05456acd - Patch
References () https://github.com/samtools/htslib/security/advisories/GHSA-qgqh-h2q9-7w3c - () https://github.com/samtools/htslib/security/advisories/GHSA-qgqh-h2q9-7w3c - Patch, Vendor Advisory
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:*:*:*:*:*:*:*:*

18 Mar 2026, 19:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-03-18 19:16

Updated : 2026-06-17 10:34


NVD link : CVE-2026-31963

Mitre link : CVE-2026-31963

CVE.ORG link : CVE-2026-31963


JSON object : View

Products Affected

htslib

  • htslib
CWE
CWE-122

Heap-based Buffer Overflow

CWE-129

Improper Validation of Array Index

CWE-787

Out-of-bounds Write