Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious CRAM file with BYTE_ARRAY_STOP encoding
-
DeliveryUser opens file in application using HTSlib
-
ExploitOut-by-one error in buffer check
-
ExecutionSingle byte written past heap allocation
-
ImpactHeap buffer overflow triggered
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Victim must open a crafted CRAM format file (containing |
| Impact | While a precise CVSS base score and vector are not provided in the advisory, the vulnerability exhibits characteristics typical of high-severity heap overflows: the attack vector is network/local (requiring a crafted file), complexity is low (single out-by-one condition), and no privileges are required. The technical impact is severe—heap corruption can lead to denial of service or, with sufficient heap layout control, arbitrary code execution. However, real-world exploitability is moderated by several factors: HTSlib is primarily used by bioinformatics researchers and healthcare institutions in controlled environments rather than exposed internet services; no public exploit code or KEV listing exists; and the attacker must craft a malicious CRAM file and convince a user to process it. SSVC analysis suggests the exploitation status is unproven (no public POC), the impact is severe (code execution possible), and automation is unlikely (requires file format manipulation and heap state knowledge). The availability of patches across three stable branches (1.21.1, 1.22.2, 1.23.1) with a public GitHub commit (88cdf69) indicates vendor responsiveness. Risk priority should be elevated for organizations processing untrusted CRAM files or exposing HTSlib-based services, but is moderate for standard research workflows with file provenance controls. |
| Exploit ScenarioDerived | An attacker crafts a malicious CRAM-formatted DNA sequencing file with a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
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_stop_decode_char() function that allows a single attacker-controlled byte to be written beyond the end of a heap allocation. This heap buffer overflow (CWE-122) affects bioinformatics applications using HTSlib to process CRAM-formatted DNA sequence alignment files, and could enable arbitrary code execution if exploited. No public exploit code or KEV status is currently documented, but patch availability exists for multiple stable release branches.
RemediationAI
Immediately upgrade HTSlib to version 1.21.1, 1.22.2, or 1.23.1 or later, depending on your current branch. Consult the vendor advisory at https://github.com/samtools/htslib/security/advisories/GHSA-q4cj-f4h5-fqgc and review the patch commit at https://github.com/samtools/htslib/commit/88cdf69e4b83bb550ab4f6f7134892c2ad1978f4. No workaround is available according to the advisory, making patching mandatory. For organizations unable to patch immediately, implement compensating controls: validate CRAM file provenance and restrict processing to trusted sources only, run CRAM decoding operations in isolated containers or virtual machines to limit blast radius, and monitor process behavior for segmentation faults or unexpected terminations that may indicate exploitation attempts.
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
HTSlib is a widely-used C library for reading and writing bioinformatics file formats including CRAM, BAM, and SAM. CRAM is a compressed binary format designed for efficient storage of DNA sequence alignment data, employing multiple encoding and compression schemes. The vulnerability resides in the cram_byte_array_stop_decode_char() function, which decodes data encoded using the BYTE_ARRAY_STOP compression method within CRAM streams. The root cause is classified as CWE-122 (Heap-based Buffer Overflow), specifically an off-by-one error in the boundary check for the output buffer. The affected product is identified by CPE cpe:2.3:a:samtools:htslib:*:*:*:*:*:*:*:*, indicating all versions of HTSlib by SAMtools are affected unless patched. This library is a foundational dependency for genome analysis pipelines, variant calling suites, and bioinformatics research platforms globally.
Know when Htslib 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. When reading data encoded using the BYTE_ARRAY_STOP method, an out-by-one error in the cram_byte_array_stop_decode_char() function check for a full output buffer could result in a single attacker-controlled byte being written beyond the end of a heap allocation. Exploiting this bug causes a heap buffer overflow. If a user opens a file crafted to exploit this issue, it could lead to the program crashing, or overwriting of data and heap structures in ways not expected by the program. It may be possible to use this to obtain arbitrary code execution. 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
Organizations using HTSlib face moderate risk from CVE-2026-31969, a heap-based buffer overflow vulnerability rated CVSS 7.1. Exploitation could allow attackers to corrupt memory, crash the application, or potentially execute arbitrary code. Organizations should apply vendor updates when available and consider compensating controls in the interim.
Apply vendor patch. If immediate patching is not feasible: (1) Enable ASLR and DEP where available; (2) Implement network segmentation; (3) Monitor for exploitation indicators.
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
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Related Vulnerabilities in HTSlib Memory Corruption Vulnerabilities
View all 4An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au
samtools htslib library version 1.4.0 and earlier is vulnerable to buffer overflow in the CRAM rANS codec resulting in p
An issue has been found in HTSlib 1.8. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, n
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(
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
In HTSlib 1.8, a race condition in cram/cram_io.c might allow local users to overwrite arbitrary files via a symlink att
An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au
Same weakness CWE-122 – Heap-based Buffer Overflow
View allVendor StatusVendor
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| bullseye | vulnerable | 1.11-4 | - |
| bookworm | vulnerable | 1.16+ds-3 | - |
| trixie | vulnerable | 1.21+ds-1 | - |
| forky, sid | vulnerable | 1.22.1+ds2-1 | - |
| (unstable) | fixed | (unfixed) | - |
EUVD-2026-12944
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB