Skip to main content

Samtools CVE-2026-31973

| EUVDEUVD-2026-12958 MEDIUM
NULL Pointer Dereference (CWE-476)
2026-03-18 GitHub_M
6.9
CVSS 4.0 · GitHub Advisory
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

This vulnerability presents a moderate denial-of-service risk with low real-world exploitability complexity. The attack vector is local (via file input) and requires no privileges to trigger, as any user can invoke the cram-size command with a crafted CRAM file. CVSS scoring data is unavailable from the intelligence sources, preventing formal vector analysis; however, the technical impact is limited to availability (application crash) rather than confidentiality or integrity. No EPSS score, KEV status, or public proof-of-concept code is reported, suggesting this is not actively exploited in the wild. The vulnerability is automatable in the sense that a fuzzer or malformed file generator could reliably trigger the crash, but an attacker would need local file system access or the ability to influence input files processed by SAMtools. Organizations running bioinformatics workflows should prioritize patching primarily to maintain service availability rather than due to a critical security breach risk.

Exploit ScenarioDerived

An attacker with local file system access or the ability to influence file uploads in a bioinformatics pipeline could craft a malformed CRAM file with a corrupted compression header. When a researcher or automated workflow invokes the cram-size command on this file to analyze compression metrics, the missing error check allows the null pointer dereference to occur, causing an immediate process crash and disrupting the analysis pipeline. This is particularly damaging in high-throughput genomics environments where SAMtools cram-size is used to monitor storage efficiency across large file batches.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 18, 2026

SAMtools versions 1.17 and later contain a null pointer dereference vulnerability in the cram-size command due to missing error handling for the cram_decode_compression_header() function. When this function fails and returns an error, the code does not properly validate the return value before dereferencing the pointer, allowing an attacker to crash the application by providing a malformed CRAM file. This is a denial-of-service vulnerability with no active exploitation reported in the wild, though patches are available in versions 1.23.1, 1.22.2, and 1.21.1.

RemediationAI

Upgrade SAMtools to version 1.23.1, 1.22.2, or 1.21.1 or later, depending on your currently deployed version. The fix is implemented in commit 06fc2a219b3d7c94d3f412c09f6d1efd51199f2f, which adds proper error checking for the cram_decode_compression_header() function return value. No workaround exists for this issue, making patching mandatory. Users unable to upgrade immediately should restrict execution of the cram-size command to trusted administrators and validate all input CRAM files using alternative tools before processing them with SAMtools. Consult the GitHub security advisory at https://github.com/samtools/samtools/security/advisories/GHSA-x86f-q6fj-cm43 for detailed patch notes and deployment guidance.

Affected VersionsENISA

samtools 1.22, < 1.22.2
samtools = 1.23
samtools 1.17, < 1.21.1

Affected Packages

euvd samtools fix: 1.21.1, 1.22.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SAMtools (cpe:2.3:a:samtools:samtools:*:*:*:*:*:*:*:*) is a widely-used bioinformatics utility for manipulating sequence alignment map (SAM), BAM, and CRAM file formats. The vulnerability exists specifically in the cram-size subcommand, which analyzes CRAM file compression efficiency. The root cause is classified as CWE-476 (Null Pointer Dereference), which occurs when the cram_decode_compression_header() function encounters malformed CRAM file headers and returns an error condition. The vulnerable code path fails to check the function's return value before using the resulting pointer, leading to a dereference of a null or invalid memory address. CRAM is a reference-based compression format for genomic sequencing data, making SAMtools critical infrastructure in bioinformatics pipelines.

Know when Samtools gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 6.9 MEDIUM
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
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Apr 16, 2026 - 05:29 EUVD
1.22.2,1.21.1
CVE Published
Mar 18, 2026 - 20:34 nvd
MEDIUM 6.9

DescriptionGitHub Advisory

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.

Executive ViewAI

Why It Matters

Organizations using SAMtools should be aware of notable risk from CVE-2026-31973, a null pointer dereference vulnerability rated CVSS 6.9. Exploitation could compromise the security of affected deployments. Organizations should apply vendor updates when available and monitor for exploitation.

Business Impact: Moderate
Compensating Controls

Apply vendor patch. If patching is delayed: enable ASLR/DEP, apply network segmentation.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Related Vulnerabilities in SAMtools Multiple Memory Safety Issues

View all 2
CVE-2022-21126 HIGH POC
7.8 Nov 29

The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insec

CVE-2026-31963 HIGH
8.8 Mar 18

HTSlib contains a heap buffer overflow vulnerability in its CRAM decoder caused by an out-by-one error when validating f

CVE-2026-31962 HIGH
8.8 Mar 18

HTSlib versions prior to 1.23.1, 1.22.2, and 1.21.1 contain a heap buffer overflow vulnerability in the cram_decode_seq(

CVE-2026-31968 HIGH
8.8 Mar 18

HTSlib contains a buffer overflow vulnerability in its CRAM format decoder affecting the VARINT and CONST encoding handl

CVE-2026-62258 HIGH
8.8 Nov 19

Stack-based buffer overflow in HTSlib's CRAM decoder affects all releases before 1.21.2, 1.22.3, 1.23.2, and 1.24: a cra

CVE-2026-62257 HIGH
8.8 Nov 19

Heap out-of-bounds read and write in HTSlib's experimental CRAM v4 XPACK and XRLE decoders allows a remote, unauthentica

CVE-2026-63390 HIGH
8.8 Nov 19

Heap buffer overflow in HTSlib's BCF reader allows an attacker-crafted BCF file to corrupt heap memory when opened by an

CVE-2026-31971 HIGH
7.1 Mar 18

HTSlib, a widely-used bioinformatics library for reading and writing sequence alignment formats, contains a critical buf

CVE-2026-31969 HIGH
7.1 Mar 18

HTSlib versions prior to 1.21.1, 1.22.2, and 1.23.1 contain an out-by-one error in the CRAM decoder's `cram_byte_array_s

CVE-2026-31970 HIGH
7.1 Mar 18

HTSlib versions prior to 1.23.1, 1.22.2, and 1.21.1 contain a heap buffer overflow vulnerability in the GZI index loadin

CVE-2026-62256 HIGH
7.1 Nov 19

A heap-based buffer overflow in HTSlib's fai_retrieve allows a crafted FASTA .fai index to write one byte past the end o

CVE-2026-62255 HIGH
7.1 Nov 19

Heap-based memory corruption in HTSlib's CRAM index loader (cram_index_load) lets a malformed .crai index drive out-of-b

Vendor StatusVendor

SUSE

Severity: High

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy