Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malformed .crai CRAM index
-
DeliveryVictim tool issues region query on CRAM
-
ExploitInteger wrap bypasses index-array growth check
-
ExecutionOut-of-bounds heap read used as write pointer
-
ImpactMemory corruption or denial of service
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 victim to perform any region query (even a valid one) on a CRAM file whose companion .crai index is attacker-supplied and malformed so that its reference-sequence count exceeds the CRAM header's reference count; this is unauthenticated (PR:N) but requires user interaction (UI:P) because the victim must process the malicious index. The broad denial-of-service path (unbounded index-array allocation) triggers whenever the index reference count exceeds the header count. The more serious unchecked heap memory write is further limited: it occurs only when the number of references in the index is within two of INT_MAX, so the integer-wrap growth check is bypassed. There is no workaround per the vendor; updating to a fixed version is the only remedy. |
| Impact | This is a moderate-priority issue (CVSS 4.0 base 7.1, vuln.today decision 'this_week'), not a drop-everything emergency, and the signals are internally consistent. The supplied CVSS 4.0 vector is AV:N/AC:L/AT:N/PR:N/UI:P - network-reachable and unauthenticated (PR:N), but it requires user interaction (UI:P): the victim must process an attacker-supplied malformed .crai CRAM index. Impact is VI:H with VA:L and VC:N, i.e. the dangerous outcome is an unchecked heap memory write (integrity) with a lesser denial-of-service facet and no confidentiality loss, matching CWE-122/CWE-787. No EPSS score, no KEV entry, and no exploit reference are present in the input - the GitHub references are the GHSA advisory, the fix PR #2029, four fix commits and the four release tags, i.e. patch artifacts, not weaponized exploit code - so there is no public exploit identified at time of analysis and no evidence of active exploitation. Two distinct severities exist within one bug: the unbounded-allocation DoS is reachable by any region query against a malformed index, whereas the memory-corruption write path requires the index reference count to be within two of INT_MAX, a narrow precondition the advisory states explicitly. Net: credible library-level flaw worth patching on a normal cycle, but exploitability of the memory-write path is constrained and no in-the-wild activity is indicated. |
| Exploit ScenarioDerived | An attacker distributes a CRAM alignment file together with a malformed .crai index (e.g. via a shared dataset, pipeline input, or public repository). When a victim tool built on HTSlib performs any region query, cram_index_load accepts an index reference count exceeding the CRAM header count, driving unbounded allocation (DoS); if the index reference count is within two of INT_MAX, an integer wrap bypasses the growth check, reads past a heap buffer, and uses that value as a pointer for an unchecked write. No public exploit code is identified at time of analysis - the available references are fix commits and the advisory, not working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Heap-based memory corruption in HTSlib's CRAM index loader (cram_index_load) lets a malformed .crai index drive out-of-bounds memory access when the victim runs any region query on the associated CRAM file. Affected are HTSlib builds before 1.21.2, 1.22.3, 1.23.2 and 1.24, and because cram_index_load never checks the index's reference-sequence count against the CRAM header's count, an oversized index first causes unbounded allocation (denial of service) and, when the index reference count lands within two of INT_MAX, an integer wrap-around in the array-growth calculation that reads past a heap buffer and uses the value as a write pointer. The CVSS 4.0 base score is 7.1 and the assessed vector is AV:N/AC:L/PR:N/UI:R with high integrity and low availability impact; no public exploit code has been identified at time of analysis, and exploitation requires the victim to process an attacker-supplied index.
RemediationAI
Vendor-released patches exist: upgrade to HTSlib 1.21.2, 1.22.3, 1.23.2 or 1.24 depending on the branch in use; the fix adds an upper bound check that rejects index entries whose refid is greater than or equal to sam_hdr_nref, so no application-side change is needed beyond relinking against a fixed library. The upstream advisory (GHSA-28r7-prwc-hf5c) explicitly states there is no workaround, so updating is the only complete remedy - applications cannot be hardened by configuration, and the flaw is reached by any region query, including valid ones, once a malformed .crai index is loaded. Where an immediate upgrade is not possible, the only actionable reduction in exposure is procedural: avoid opening CRAM files paired with .crai indexes of unverified provenance in HTSlib-based pipelines and viewers, which limits attacker-supplied index data but leaves the vulnerable code path intact for any index that is processed.
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 DNA sequence alignment data, and its .crai companion index enables random access to records. HTSlib's cram_index_load populates an internal per-reference index array (fd->index) keyed by the refid field read from the index entries, but before the fix it did not bound refid against the number of reference sequences declared in the CRAM file header (sam_hdr_nref). The upstream patch (commit 57e1a07, PR #2029) adds int nref = sam_hdr_nref(fd->header) and tightens the entry validation from 'e.refid < -1' to 'e.refid < -1 || e.refid >= nref'. The root cause is CWE-122 (heap-based buffer overflow), with the advisory additionally classifying CWE-125 (out-of-bounds read), CWE-787 (out-of-bounds write) and CWE-789 (unbounded allocation). Two distinct behaviours result: a malformed index with more references than the header forces unbounded index-array growth (memory exhaustion / denial of service), and a reference count within two of INT_MAX causes the growth-size computation to wrap, so the check fails, a value is read from beyond the heap buffer's end, and that value is then used as a pointer for an unchecked memory write. The exact heap layout and allocator behaviour governing whether the write path is reached are not described in the available sources beyond the INT_MAX-proximity precondition; the advisory states any region query, even a valid one, triggers the vulnerable path once a malformed index is loaded.
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
Attacker-supplied malformed index processed by the victim gives AV:N/PR:N/UI:R; the unchecked heap write is integrity-impacting (I:H) with a DoS facet (A:L) and no confidentiality loss (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, cram_index_load does not verify that the number of reference sequences in a CRAM .crai index does not exceed the CRAM header reference count. A malformed index can drive unbounded index-array allocation, and when the number of references in the index is within two of INT_MAX, the growth calculation can wrap, read beyond a heap buffer, and use the resulting value as a pointer for an unchecked memory write. Any region query can trigger the flaw, causing denial of service or memory corruption. 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 the advisory additionally scoring CWE-125 (out-of-bounds read), CWE-787 (out-of-bounds write) and CWE-789 (allocation with excessive size value).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity memory corruption vulnerability in the widely used bioinformatics library HTSlib could allow attackers to crash genomic analysis pipelines or corrupt processed data. Organizations relying on HTSlib for clinical, research, or diagnostic sequencing workflows face potential disruption and data integrity risks until patched versions are deployed.
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.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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 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
HTSlib, a widely-used bioinformatics library for reading and writing sequence alignment formats, contains a critical buf
EUVD-2026-130352
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB