CVE-2026-31972 samtools mpileup has use-after-free leading to an invalid read
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
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.
Upgrade path
8 packages: 2 fixed, 6 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/samtools(Debian 12) | = 1.16.1-1; = 1.17-0+exp1; = 1.17-1; = 1.18-1 +11 more | No fix listed | No fix yet |
| debian/samtools(Debian 13) | = 1.21-1; = 1.22.1-1; = 1.24-1; = 1.24-2 +1 more | No fix listed | No fix yet |
| ubuntu/samtools(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/samtools(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/samtools(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/samtools(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/samtools(Debian 14) | < 1.22.1-1; = 1.21-1 | 1.22.1-1 | Fixed |
| samtools | < 1.21.1; = < 1.21.1 | 1.21.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| samtools | = < 1.21.1 | No fix listed |
| debian/samtools(Debian:12) | All versions | No fix listed |
| debian/samtools(Debian:12) | = 1.16.1-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.17-0+exp1 | No fix listed |
| debian/samtools(Debian:12) | = 1.17-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.18-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.19-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.19.2-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.20-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.20-2 | No fix listed |
| debian/samtools(Debian:12) | = 1.20-3 | No fix listed |
| debian/samtools(Debian:12) | = 1.21-0+exp1 | No fix listed |
| debian/samtools(Debian:12) | = 1.21-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.22.1-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.24-1 | No fix listed |
| debian/samtools(Debian:12) | = 1.24-2 | No fix listed |
| debian/samtools(Debian:13) | All versions | No fix listed |
| debian/samtools(Debian:13) | = 1.21-1 | No fix listed |
| debian/samtools(Debian:13) | = 1.22.1-1 | No fix listed |
| debian/samtools(Debian:13) | = 1.24-1 | No fix listed |
| debian/samtools(Debian:13) | = 1.24-2 | No fix listed |
| debian/samtools(Debian:14) | < 1.22.1-1 | 1.22.1-1 |
| debian/samtools(Debian:14) | = 1.21-1 | No fix listed |
| ubuntu/samtools(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/samtools(Ubuntu:24.04) | All versions | No fix listed |
Show 3 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/samtools(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/samtools(Ubuntu:26.10) | All versions | No fix listed |
| samtools | < 1.21.1 | 1.21.1 |
References
- https://github.com/samtools/samtools/security/advisories/GHSA-72c8-4jf3-f27p vendor-advisory
- https://github.com/samtools/samtools/commit/3036eb9af945fcef359427a2d359855553da4adf patch
- www.openwall.com mailing-list third-party-advisory
- Debian Security Tracker CVE-2026-31972 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- www.cve.org