Skip to main content

HTSlib CVE-2026-62255

| EUVDEUVD-2026-130352 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-11-19 GitHub_M
7.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malformed .crai CRAM index
  2. Delivery
    Victim tool issues region query on CRAM
  3. Exploit
    Integer wrap bypasses index-array growth check
  4. Execution
    Out-of-bounds heap read used as write pointer
  5. Impact
    Memory 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

htslib 1.22.0, < 1.22.3
htslib 1.23.0, < 1.23.2
htslib < 1.21.2

Affected Packages

euvd htslib fix: 1.21.2, 1.22.3, 1.23.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

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

Vendor (GitHub_M) PRIMARY 7.1 HIGH
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
vuln.today AI 7.1 HIGH

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
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 Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Nov 19, 2026 - 17:03 EUVD
CVE Published
Nov 19, 2026 - 15:45 cve.org
HIGH 7.1

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 50% exploitable
Prevalence
Low
foundational bioinformatics library but industry-specific to genomics tooling
Data Quality
5 sources
Confidence: Medium

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 HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

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

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.

More in Htslib

View all
CVE-2018-13843 HIGH POC
7.5 Jul 10

An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au

CVE-2017-1000206 CRITICAL
9.8 Nov 17

samtools htslib library version 1.4.0 and earlier is vulnerable to buffer overflow in the CRAM rANS codec resulting in p

CVE-2018-13845 CRITICAL
9.8 Jul 10

An issue has been found in HTSlib 1.8. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, n

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-2018-14329 MEDIUM POC
4.7 Jul 17

In HTSlib 1.8, a race condition in cram/cram_io.c might allow local users to overwrite arbitrary files via a symlink att

CVE-2018-13844 HIGH
7.5 Jul 10

An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au

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

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