CVE-2026-31972
published medium CVSS 4.0 · 6.9samtools mpileup has use-after-free leading to an invalid read
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| samtools | — | samtools< 1.21.1 | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.9 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| samtools | samtools | < 1.21.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-416 CWE-416: Use After Free
References
3Provider assertions
3GitHub_M · cna
samtools mpileup has use-after-free leading to an invalid read
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- de3584addc55eb1dd3efd8066683e2223c962084bebacf1563cbc7103254398c
- Ingested
- 23 Sep 2026, 09:09:43 UTC
- Source record
- Official CVE record