CVE-2026-31972
JSON

6.9medium

samtools mpileup has use-after-free leading to an invalid read

Severity
6.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.76% (higher than 52% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

SAMtools is a program for reading, manipulating and writing bioinformatics file formats. The `mpileup` command outputs DNA sequences that have been aligned against a known reference. On each output line it writes the reference position, optionally the reference DNA base at that position (obtained from a separate file) and all of the DNA bases that aligned to that position. As the output is ordered by position, reference data that is no longer needed is discarded once it has been printed out. Under certain conditions the data could be discarded too early, leading to an attempt to read from a pointer to freed memory. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt to access invalid memory. This bug is fixed in versions 1.21.1 and 1.22. There is no workaround for this issue.

Affected

Product or packageVersionsReported by
samtools samtools< 1.21.1, before 1.21.1CVE List, NVD

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-416

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

SAMtools is a program for reading, manipulating and writing bioinformatics file formats. The `mpileup` command outputs DNA sequences that have been aligned against a known reference. On each output line it writes the reference position, optionally the reference DNA base at that position (obtained from a separate file) and all of the DNA bases that aligned to that position. As the output is ordered by position, reference data that is no longer needed is discarded once it has been printed out. Under certain conditions the data could be discarded too early, leading to an attempt to read from a pointer to freed memory. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt to access invalid memory. This bug is fixed in versions 1.21.1 and 1.22. There is no workaround for this issue.

NVD (es)

SAMtools es un programa para leer, manipular y escribir formatos de archivo bioinformáticos. El comando 'mpileup' genera secuencias de ADN que han sido alineadas contra una referencia conocida. En cada línea de salida escribe la posición de referencia, opcionalmente la base de ADN de referencia en esa posición (obtenida de un archivo separado) y todas las bases de ADN que se alinearon con esa posición. Como la salida está ordenada por posición, los datos de referencia que ya no son necesarios se descartan una vez que se han impreso. Bajo ciertas condiciones, los datos podrían descartarse demasiado pronto, lo que llevaría a un intento de leer desde un puntero a memoria liberada. Este error puede permitir la fuga de información sobre el estado del programa. También puede causar un fallo del programa a través de un intento de acceder a memoria no válida. Este error está corregido en las versiones 1.21.1 y 1.22. No hay una solución alternativa para este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31972 changed 2026-03-19CVE Terms of Use
NVDCVE-2026-31972 changed 2026-06-17Public domain