Skip to content
Heist/ feed
Back to feed
Critical

samtools — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-31972

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.

Products
samtools
Affected versions
0.1.19-1, 0.1.19-1ubuntu1, 1.10-3, 1.13-2, 1.13-4, 1.17-1, 1.18-1, 1.19-1, 1.19.2-1, 1.19.2-1build1, 1.19.2-1build2, 1.21-1, 1.22.1-1, 1.4.1-1build1, 1.5-1build1, 1.6-3ubuntu1, 1.6-4, 1.7-1, 1.9-4, 1.9-5, 1.9-6, 1.9-7
Fixed versions
Not specified
CVEs
CVE-2026-31972
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:43 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-31972

core-osv · Original source

Published 18 Mar 2026, 21:16 UTC

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.

osv:UBUNTU-CVE-2026-31972

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

samtools

Fixed versions: Not specified

Complete source record
{
  "id": "45c2907624987871faab431a80119df66ea63b1c58baaf482c99dfb3bd133ac4",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-31972",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-31972",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2026-31972",
    "products": [
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.1.19-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.1.19-1ubuntu1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.4.1-1build1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.5-1build1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.6-3ubuntu1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.6-4",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.7-1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.9-4",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.9-5",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.9-6",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.9-7",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10-3",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.13-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.13-4",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.17-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.18-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.19-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.19.2-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.19.2-1build1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.19.2-1build2",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.21-1",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.22.1-1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "samtools",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.21-1",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "1.22.1-1",
            "evidence": "/affected/8/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "UBUNTU-CVE-2026-31972",
      "aliases": [
        "UBUNTU-CVE-2026-31972"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=trusty",
            "ecosystem": "Ubuntu:14.04:LTS"
          },
          "versions": [
            "0.1.19-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "0.1.19-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "0.1.19-1ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "0.1.19-1ubuntu1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "1.4.1-1build1",
            "1.5-1build1",
            "1.6-3ubuntu1",
            "1.6-4",
            "1.7-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.7-1"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.7-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "1.9-4",
            "1.9-5",
            "1.9-6",
            "1.9-7",
            "1.10-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.10-3"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.10-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "1.13-2",
            "1.13-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.13-4"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.13-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "1.17-1",
            "1.18-1",
            "1.19-1",
            "1.19.2-1",
            "1.19.2-1build1",
            "1.19.2-1build2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.19.2-1build2"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.19.2-1build2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "1.21-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.21-1"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.21-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "1.22.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.22.1-1"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.22.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "samtools",
            "purl": "pkg:deb/ubuntu/samtools?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "1.21-1",
            "1.22.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-31972.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "samtools",
                "binary_version": "1.22.1-1"
              },
              {
                "binary_name": "samtools-test",
                "binary_version": "1.22.1-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:50.997566590Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-31972"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-31972",
        "https://www.cve.org/CVERecord?id=CVE-2026-31972",
        "https://github.com/samtools/samtools/security/advisories/GHSA-72c8-4jf3-f27p",
        "https://github.com/samtools/samtools/commit/3036eb9af945fcef359427a2d359855553da4adf"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-31972",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359108,
  "published_at": "2026-03-18T21:16:00+00:00"
}