Use After Free Affecting samtools package, versions <1.22.1-1


Severity

Recommended
low

Based on Debian security rating.

Threat Intelligence

EPSS
0.58% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-SAMTOOLS-15721262
  • published21 Mar 2026
  • disclosed18 Mar 2026

Introduced: 18 Mar 2026

CVE-2026-31972  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade Debian:unstable samtools to version 1.22.1-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream samtools package and not the samtools package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1