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.
CVE-2026-31972
This critical-severity CVE scores 9.8 under NVD CVSS v3. EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 9.8
- EG Score
- 9.8(low)
- EG Risk
- 49(Track)EG Risk 49/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity98% × 45%Exploitation0% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 1%
- EPSS %ILE
- 41%
- KEV
- Not listed
Published
March 18, 2026
Last Modified
June 17, 2026
Advisory Details (3)
Auto-updated Jul 27, 2026oss-security - CVE-2026-31972: samtools <= 1.21 Use-after-free in mpileup leading to an invalid read
http://www.openwall.com/lists/oss-security/2026/03/18/11Use-after-free in samtools mpileup leading to an invalid read · Advisory · samtools/samtools · GitHub
Affected: versions 1.21.1 and 1.22
https://github.com/samtools/samtools/security/advisories/GHSA-72c8-4jf3-f27pcommit 3036eb9af945 (samtools/samtools)
Patch available: samtools/samtools 1.23 (contains commit 3036eb9af945)
https://github.com/samtools/samtools/commit/3036eb9af945fcef359427a2d359855553da4adfWeakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 5× in last 7d / 5× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-08-01 04:16 UTCEPSS rescore
- 2026-07-30 16:28 UTCEPSS rescore
- 2026-07-30 01:30 UTCEPSS rescore
- 2026-07-28 15:36 UTCEPSS rescore
- 2026-07-27 14:41 UTCEG score recompute
Related CVEs(same CWE)
Frequently asked(5)
What is CVE-2026-31972?
When was CVE-2026-31972 disclosed?
Is CVE-2026-31972 actively exploited?
What is the CVSS score of CVE-2026-31972?
How do I remediate CVE-2026-31972?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2026-31972
Is Your Infrastructure Affected by CVE-2026-31972?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.