Description
SAMtools is a program for reading, manipulating and writing bioinformatics file formats. Starting in version 1.17, in the cram-size command, used to write information about how well CRAM files are compressed, a check to see if the `cram_decode_compression_header()` was missing. If the function returned an error, this could lead to a NULL pointer dereference. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.
Published: 2026-03-18
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service (Application Crash)
Action: Immediate Patch
AI Analysis

Impact

The flaw exists in the cram-size command of SAMtools starting from version 1.17, where a missing check on the return value of cram_decode_compression_header() can lead to a NULL pointer dereference. The resulting crash causes the program to terminate, disrupting any bioinformatics pipeline that relies on SAMtools. This is a policy‑flaw type of memory error (CWE‑476).

Affected Systems

Affected product: samtools:samtools. Versions from 1.17 up to, but not including, the patched releases 1.21.1, 1.22.2, and 1.23.1 are vulnerable. The patch is included in releases 1.21.1, 1.22.2, and 1.23.1; any installation older than 1.21.1 is at risk.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate severity, and the EPSS score of less than 1% suggests a low likelihood of exploitation in the wild. The vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that the vulnerability requires an attacker to invoke cram-size with a CRAM header that causes cram_decode_compression_header() to fail, which would likely need local or restricted input access. Once triggered, the application crashes, providing a denial‑of‑service to legitimate users but not affecting confidentiality or integrity of other systems.

Generated by OpenCVE AI on March 19, 2026 at 20:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to samtools version 1.23.1, 1.22.2, or 1.21.1, which include the fix.

Generated by OpenCVE AI on March 19, 2026 at 20:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 19 Mar 2026 19:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:samtools:samtools:*:*:*:*:*:*:*:*
cpe:2.3:a:samtools:samtools:1.23:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Thu, 19 Mar 2026 17:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 19 Mar 2026 09:45:00 +0000

Type Values Removed Values Added
First Time appeared Samtools
Samtools samtools
Vendors & Products Samtools
Samtools samtools

Thu, 19 Mar 2026 00:30:00 +0000

Type Values Removed Values Added
References

Wed, 18 Mar 2026 21:00:00 +0000

Type Values Removed Values Added
Description SAMtools is a program for reading, manipulating and writing bioinformatics file formats. Starting in version 1.17, in the cram-size command, used to write information about how well CRAM files are compressed, a check to see if the `cram_decode_compression_header()` was missing. If the function returned an error, this could lead to a NULL pointer dereference. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.
Title NULL pointer dereference in samtools cram-size
Weaknesses CWE-476
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N'}


Subscriptions

Samtools Samtools
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-19T16:14:59.386Z

Reserved: 2026-03-10T15:40:10.486Z

Link: CVE-2026-31973

cve-icon Vulnrichment

Updated: 2026-03-18T23:08:20.721Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-18T21:16:26.250

Modified: 2026-03-19T18:48:10.830

Link: CVE-2026-31973

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-03-25T11:52:15Z

Weaknesses