Skip to main content

HTSlib CVE-2026-62257

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

Attack ChainAIDerived

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

  1. Access
    Deliver crafted CRAM v4 file
  2. Delivery
    Target decodes XPACK/XRLE block
  3. Exploit
    Input-controlled index exceeds 512-element array
  4. Execution
    Out-of-bounds read then NULL triggers OOB write
  5. Persist
    Corrupt heap state
  6. Impact
    Crash 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).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.8% 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 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

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

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

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

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/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
None
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:41 cve.org
HIGH 8.8

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, 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.8%
Top 43% exploitable
Prevalence
Low
Dominant bioinformatics file-format library, but confined to genomics/research sector
Data Quality
4 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.8%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
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.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

CVE-2026-31969 HIGH
7.1 Mar 18

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

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