CVE-2026-31972 Details
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.
A use-after-free vulnerability has been identified in SAMtools versions through 1.21, specifically within the mpileup command. This issue arises when reference data is discarded too early, leading to an attempt to read from a pointer to freed memory. Such behavior could potentially leak information about the program's state or cause a crash by accessing invalid memory.
Users can upgrade to SAMtools versions 1.21.1 or 1.22 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 19, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| http://www.openwall.com/lists/oss-security/2026/03/18/11 | CVE | Mailing ListThird Party Advisory |
| https://github.com/samtools/samtools/commit/3036eb9af945fcef359427a2d359855553da4adf | [email protected] | Patch |
| https://github.com/samtools/samtools/security/advisories/GHSA-72c8-4jf3-f27p | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| samtools samtools | < 1.21.1 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 19, 2026 | Initial Analysis | [email protected] |
| Mar 19, 2026 | CVE Modified | CVE |
| Mar 18, 2026 | New CVE Received | [email protected] |