Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted CRAM v4 file
-
DeliveryTarget decodes XPACK/XRLE block
-
ExploitInput-controlled index exceeds 512-element array
-
ExecutionOut-of-bounds read then NULL triggers OOB write
-
PersistCorrupt heap state
-
ImpactCrash or potential arbitrary code execution
Vulnerability Assessment
| Weakness |
CWE
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 | Exploitation requires the target to decode an attacker-supplied CRAM file that uses the EXPERIMENTAL CRAM v4 XPACK or XRLE codecs; the out-of-bounds array index into slice->block_by_id (fixed at 512 elements) is partially controlled by data within that input file. No authentication is required (PR:N) and no user interaction is specified in the vector (UI:N), consistent with automated pipelines or services that decode uploaded genomic files. The key LIMITING factor is that these are experimental v4 decoders, not the default/stable CRAM path, so a target is only exposed if it actually accepts and processes v4 files encoded with these codecs; there is no workaround short of upgrading to a fixed version. The out-of-bounds read is always triggered (reliable crash primitive), but the write - and thus any path to code execution - depends on the out-of-bounds read value being NULL, which is not fully attacker-controlled. |
| Impact | Severity signals are consistent and credible but exposure is gated. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N, VI:H/VA:L) and my independent assessment agree: an unauthenticated attacker who can get a target to parse a crafted file reaches the vulnerable code with low complexity, and the impact is memory corruption (out-of-bounds heap read followed by an out-of-bounds heap write) that the advisory states 'may be possible to use... to obtain arbitrary code execution.' Against that, the real-world priority is tempered by two factors the raw 8.8 does not capture. First, the flaw lives only in the EXPERIMENTAL CRAM v4 XPACK and XRLE decoders - a target must actually accept and decode v4 files using these codecs, which is not the stable/default CRAM path. Second, there is no CISA KEV listing and no EPSS score in the supplied data, and no exploit or proof-of-concept reference is present (the GitHub links are the advisory, fixing PRs, patch commits, and release tags - not exploit code), so there is no evidence of active or public exploitation. The vuln.today decision label is 'this_week,' not act_now/emergency, which aligns with a serious-but-not-actively-exploited memory-corruption bug in a widely-used-within-its-domain library. Note the CWE data is partially conflicting: the input lists only CWE-122 (heap overflow) while the GHSA advisory lists CWE-122, CWE-125 (out-of-bounds read) and CWE-787 (out-of-bounds write), which more completely describes the read-then-write primitive - treat CWE-122 alone as incomplete. |
| Exploit ScenarioDerived | An attacker crafts a malicious CRAM v4 file whose XPACK or XRLE block references drive an array index beyond the 512-element slice->block_by_id array, then gets a victim pipeline, tool (e.g. samtools), or service to decode it. The guaranteed out-of-bounds read can crash the process; if the read element is NULL, the decoder allocates a block and performs an out-of-bounds pointer write, corrupting heap state in a way that may be steered toward code execution. No public exploit or PoC is present in the supplied data; exploitation requires only that the target decode the attacker-supplied file (no authentication per PR:N). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Heap out-of-bounds read and write in HTSlib's experimental CRAM v4 XPACK and XRLE decoders allows a remote, unauthenticated attacker to corrupt heap state by supplying a crafted CRAM file. The decoders cache expanded block pointers into the fixed 512-element slice->block_by_id array using an index partially derived from file contents; the resulting out-of-bounds read can crash the process, and when the read returns NULL the subsequent out-of-bounds pointer write can corrupt heap memory and may permit arbitrary code execution. All versions up to and including 1.23.1, 1.22.2 and 1.21.1 are affected and are fixed in 1.21.2, 1.22.3, 1.23.2 and 1.24; no public exploit code was identified at time of analysis, and exposure is gated on whether a target actually decodes experimental CRAM v4 data using these codecs.
RemediationAI
Vendor-released patch: upgrade to HTSlib 1.21.2, 1.22.3, 1.23.2 or 1.24 depending on the maintenance branch in use (these are the fixed versions per the GHSA advisory and the tagged releases at https://github.com/samtools/htslib/releases/tag/1.21.2, /1.22.3, /1.23.2 and /1.24); the underlying changes are in commits a3e8dca14dcfdc6167281721ede6d6ecd3395bad, c0b50372ed133c650fa0a641607da5cde46bcd8c and d66a77dbf8f52f7f44efd7929a28b94bbfc17f2f and pull requests 2020 and 2046, so downstream distributions and vendored copies of HTSlib need to pick up those fixes too. The vendor states there is no workaround for this issue: protection requires updating, and the only exposure-limiting consideration is whether a pipeline actually accepts and decodes experimental CRAM v4 files encoded with the XPACK or XRLE codecs, since targets that never process such files do not reach the affected decoders.
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
CRAM is a compressed bioinformatics format for storing DNA sequence alignment data, implemented in HTSlib (the library behind samtools). In the specification, blocks within a slice are normally referenced through the slice->block_by_id lookup array, which is allocated with a fixed 512 elements. The experimental CRAM v4 codecs XPACK and XRLE do not confine their cached block pointers to that array: the codec computes an index partially controlled by data in the input file and reads slice->block_by_id at that index to check whether the block is already cached. That read is out of bounds whenever the index exceeds 511. If the fetched value is NULL, the decoder allocates a block and writes the pointer back to the same out-of-bounds element, turning the read overrun into a heap write overrun. The issue is classified as CWE-122 (heap-based buffer overflow), with the vendor advisory additionally citing CWE-125 and CWE-787. The read overrun is deterministic when these codecs are used, but the write - and therefore any route to code execution - additionally depends on the out-of-bounds read yielding NULL, which is not fully attacker-controlled. The relevant code lives in cram/cram_codecs.c and is addressed by the upstream pull requests and commits referenced from the advisory (GHSA-6q7c-m967-9v37, PRs 2020 and 2046, commits a3e8dca, c0b5037 and d66a77d).
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:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
Crafted input file reaches the decoder with no auth or stated complexity gate (AV:N/AC:L/PR:N/UI:N); heap corruption gives I:H with crash-level A:L and no data disclosure (C:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
HTSlib is a library for reading and writing bioinformatics file formats. Prior to 1.21.2, 1.22.3, 1.23.2, and 1.24, the experimental CRAM v4 XPACK and XRLE decoders cache expanded block pointers at indexes beyond the 512-element slice->block_by_id array. An array index partially controlled by data in the input file first causes an out-of-bounds read to determine whether a block is cached; a null value then causes allocation of a block and an out-of-bounds pointer write to the same element. The invalid read may crash the process, while the write may corrupt heap state and could permit arbitrary code execution. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.
Technical POC Analysis
CWE-122 (heap-based buffer overflow), with CWE-125 (out-of-bounds read) and CWE-787 (out-of-bounds write) as the two constituent defects.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A heap memory corruption vulnerability in HTSlib's experimental CRAM v4 decoders (XPACK and XRLE) could allow a remote attacker to crash processes or potentially execute arbitrary code by supplying a malicious CRAM file. Organizations using HTSlib to process genomic data are at risk, but exposure is limited to systems that actually decode these experimental codecs. Leadership should care because a compromise could lead to data breaches, service disruptions, and loss of trust in genomic data pipelines.
Apply vendor patch.
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.
An 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(
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 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
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
EUVD-2026-130350
NVD
CVE.org
EPSS
GitHub
Exploit-DB