Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | While a CVSS score was not assigned, the underlying severity is moderate to high based on the available signals. The vulnerability is classified as a use-after-free with memory corruption implications, which typically carries exploitability risk. The CWE-416 classification confirms a memory safety defect that can be triggered remotely if the mpileup command processes untrusted or maliciously crafted alignment data. Attack vector is likely network or local file-based depending on deployment context. The absence of CVSS and EPSS metrics prevents quantitative comparison, but the availability of a vendor patch (versions 1.21.1 and 1.22) and public advisory indicate this was treated seriously by maintainers. The primary real-world risk depends on exposure: bioinformatics pipelines processing untrusted sequencing data face higher risk than those processing validated internal datasets. Information disclosure is the lower-impact outcome; denial of service through crash is more probable and operationally significant. |
| Exploit ScenarioDerived | An attacker or malicious actor provides a crafted BAM/SAM alignment file with specific positional characteristics that trigger premature deallocation of reference sequence buffers. When a user or automated bioinformatics pipeline processes this file through the mpileup command, the use-after-free condition is triggered, either leaking sensitive memory contents (such as uninitialized buffer data or adjacent heap structures) or causing a denial-of-service crash. The attack requires ability to supply input data to SAMtools, which is feasible in collaborative research environments or public data repository scenarios where alignment files are shared among researchers. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
SAMtools mpileup command contains a use-after-free vulnerability in reference data management that can leak sensitive program state information or trigger application crashes when processing aligned DNA sequences. The vulnerability affects versions prior to 1.2 and requires no authentication or user interaction to exploit, though a patch is not yet available. An attacker could leverage this to obtain information disclosure or cause denial of service against systems processing bioinformatics data with vulnerable SAMtools versions.
Earlier versions of this analysis (1)
A use-after-free vulnerability exists in SAMtools' mpileup command where reference DNA sequence data is prematurely freed from memory, allowing subsequent operations to read from invalid pointers. This affects SAMtools versions prior to 1.21.1 and 1.22, and can result in information disclosure leaking program state or denial of service through memory access violations. No active exploitation in the wild has been confirmed, but the vulnerability is readily exploitable given the straightforward triggering conditions described in the advisory.
RemediationAI
Upgrade SAMtools to version 1.21.1 or 1.22 (or later) immediately, as these are the confirmed patched versions addressing this use-after-free condition. The fix is available in the upstream repository at commit 3036eb9af945fcef359427a2d359855553da4adf. No workaround is available for this vulnerability according to the official advisory, so patching is mandatory. For organizations unable to update immediately, restrict mpileup command execution to trusted, validated sequencing data sources and implement process isolation or containerization to limit the blast radius of potential crashes.
Affected VersionsENISA
Affected Packages
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 is a bioinformatics utility suite used for processing DNA sequence alignment files (BAM/SAM formats). The mpileup command specifically reads aligned sequences and outputs them alongside reference sequence data obtained from a separate reference file. The vulnerability is rooted in CWE-416 (use-after-free), a memory safety defect where the reference data buffer is deallocated prematurely based on position ordering assumptions. When certain input conditions occur, the code attempts to access reference positions that have already been freed, causing the program to dereference invalid memory pointers. The affected product is identified by CPE cpe:2.3:a:samtools:samtools:*:*:*:*:*:*:*:*, indicating all versions below the patched releases are in scope.
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
Sources disagree (Medium–Critical)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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
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.
Executive ViewAI
Organizations using SAMtools should be aware of notable risk from CVE-2026-31972, a use-after-free vulnerability rated CVSS 6.9. Exploitation could compromise the security of affected deployments. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: enable ASLR/DEP, apply network segmentation.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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 2The package com.github.samtools:htsjdk before 3.0.1 are vulnerable to Creation of Temporary File in Directory with Insec
HTSlib contains a heap buffer overflow vulnerability in its CRAM decoder caused by an out-by-one error when validating f
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(
HTSlib contains a buffer overflow vulnerability in its CRAM format decoder affecting the VARINT and CONST encoding handl
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
Heap out-of-bounds read and write in HTSlib's experimental CRAM v4 XPACK and XRLE decoders allows a remote, unauthentica
Heap buffer overflow in HTSlib's BCF reader allows an attacker-crafted BCF file to corrupt heap memory when opened by an
HTSlib, a widely-used bioinformatics library for reading and writing sequence alignment formats, contains a critical buf
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
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
A heap-based buffer overflow in HTSlib's fai_retrieve allows a crafted FASTA .fai index to write one byte past the end o
Heap-based memory corruption in HTSlib's CRAM index loader (cram_index_load) lets a malformed .crai index drive out-of-b
EUVD-2026-12956
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB