Skip to main content

HTSlib CVE-2026-62256

| EUVDEUVD-2026-130307 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
    Supply crafted FASTA .fai index
  2. Delivery
    Victim pipeline calls fai_retrieve
  3. Exploit
    Undersized heap buffer allocated
  4. Execution
    One-byte out-of-bounds write
  5. Impact
    Heap corruption and process crash

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 process an attacker-controlled FASTA .fai index in which the recorded line width equals exactly the bases-per-line count minus one; this precise off-by-one is the only value that triggers the one-byte heap overwrite, because any larger width/base-count discrepancy produces a negative (failed) malloc that returns NULL and is handled cleanly. The victim application must load that untrusted index and call fai_retrieve to access a region (UI:P - passive user/pipeline interaction on untrusted input). No authentication or special product configuration is needed, but the attacker must deliver the malicious .fai file and the target must be an unpatched HTSlib (<=1.21.1, 1.22.2, or 1.23.1); the only complete fix is upgrading, as the advisory states there is no workaround.

Impact

Signals point to a genuine but moderate, low-urgency memory-safety bug rather than a mass-exploitation priority. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, VC:N/VI:H/VA:L) rates it 7.1 High, driven mainly by the VI:H integrity rating for heap corruption, with availability only Low and no confidentiality impact. UI:P is significant: exploitation requires a victim to process an attacker-supplied FASTA .fai index, so this is not remote-unauthenticated-against-a-service. No EPSS score, KEV listing, or working PoC is present in the input - the GitHub references are the advisory, the fix PR, and patch commits, not exploit code - so exploitation is currently 'no public exploit identified at time of analysis.' The real-world impact is also narrower than VI:H implies: sources describe a single-byte out-of-bounds heap write that primarily 'corrupts heap memory and crashes the process,' with larger discrepancies safely caught by a failed (negative) allocation. The vuln.today priority of 'this_week' aligns with a patch-this-cycle, not emergency, posture. Net: a real defect worth patching for anyone parsing untrusted FASTA indexes, but low probability of widespread opportunistic exploitation given the niche product and the file-processing precondition.

Exploit ScenarioDerived

An attacker crafts a malicious FASTA reference and its companion .fai index in which the recorded line width is set to exactly one less than the bases-per-line value, then gets a victim to retrieve a sequence region through HTSlib (e.g. in an automated genomics pipeline ingesting externally supplied reference data). When fai_retrieve runs, it allocates an undersized heap buffer and writes one byte past its end, corrupting the heap and crashing the process. No public exploit code is identified; realistic impact is denial of service, with heap corruption raising a theoretical but unproven path to further compromise.

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

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

Alert me

AnalysisAIv1 – Nov 19, 2026

A heap-based buffer overflow in HTSlib's fai_retrieve allows a crafted FASTA .fai index to write one byte past the end of an undersized heap allocation, corrupting memory and crashing the process that consumes the file. The bug affects HTSlib releases up to and including 1.23.1, 1.22.2 and 1.21.1, and fires only in the narrow case where the index's recorded line width is exactly one less than the bases-per-line count - any larger discrepancy instead produces a negative-size allocation that fails with NULL and is handled cleanly. According to the CVSS vector the flaw is reachable without authentication (PR:N) but requires the victim to interact with an untrusted index (UI:P), so an attacker must first deliver the malicious .fai file and get the target application to load it and call fai_retrieve; no public exploit is identified at time of analysis and the issue is not in CISA KEV.

RemediationAI

Upgrade to a fixed release: HTSlib 1.21.2, 1.22.3, 1.23.2 or 1.24, all of which are published as tagged releases at https://github.com/samtools/htslib/releases/tag/1.21.2, /1.22.3, /1.23.2 and /1.24, with the corresponding code fixes in commits cdf22929aad8dde719c1b2070ad565ac9dd76c02, 4af640f9ffd7f1fac95a739df7f560e3e5557960, 504fb841b70afb948f58089c3a4337ce875c1e52 and 567fd43c6ef938de53c98217f99336e3ce5a60ab (PR https://github.com/samtools/htslib/pull/2008) and described in advisory GHSA-4hjq-r829-8c8v. Downstream tools statically linked against HTSlib, samtools builds and vendor-packaged copies must be rebuilt against one of these versions, since patching only the system library leaves bundled copies exposed. The vendor advisory explicitly states there is no workaround for this issue, so the version upgrade is the only complete fix; scheduling can follow the moderate, this-week priority rather than an emergency response, but the upgrade should be completed before processing any untrusted FASTA/.fai inputs.

Affected VersionsENISA

htslib 1.22.0, < 1.22.3
htslib < 1.21.2
htslib 1.23.0, < 1.23.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

HTSlib is the C library underlying samtools and many bioinformatics pipelines for reading and writing FASTA/FASTQ, BAM/CRAM and VCF data. Random access into a FASTA reference depends on a companion .fai index whose columns record, per sequence: total length, byte offset of the sequence, bases per line (line_blen) and total line width including the newline terminator (line_len). In fai_retrieve the buffer for a requested region is sized using the difference between the requested span and the line padding (line_len - line_blen), and reads are performed in line_len-sized chunks; the code trusted that line_len >= line_blen without validating it. When a malicious or malformed index sets line_len = line_blen - 1, the padding arithmetic and the first-line length calculation produce an allocation one byte short, and the subsequent read writes the terminator one byte beyond the heap buffer - a CWE-122 heap-based buffer overflow (also characterized as CWE-787 out-of-bounds write). The precise off-by-one is required: with line_len more than one below line_blen the size computation goes negative, hts_malloc returns NULL and the error path handles it. The upstream fix (PR #2008) widens line_len/line_blen to uint64_t, stores only the per-line extra bytes (line_extra), and rejects indexes where line_len < line_blen, where lengths exceed HTS_POS_MAX, or where the line_len - line_blen difference exceeds UINT32_MAX.

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

Attacker-crafted index file delivered over network but requires the victim to process it (UI:R); no privileges; single-byte heap overwrite yields limited integrity impact and a crash, so I:L/A:L and C:N.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/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:52 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, fai_retrieve does not verify that the line width recorded in a FASTA .fai index is greater than or equal to the number of bases per line. When the line width is exactly one less than the base count, retrieval allocates an undersized heap buffer and writes one byte beyond its end; larger discrepancies instead cause an allocation failure that is handled. This issue can corrupt heap memory and crash the process. 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; also mapped to CWE-787).

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 memory corruption flaw in HTSlib, a widely used genomics library for reading FASTA index files, affects releases up to and including 1.23.1, 1.22.2 and 1.21.1. Research, clinical genomics and bioinformatics teams processing externally sourced or shared .fai index files are the primary exposure; successful exploitation crashes consuming applications and creates a stability and data-integrity risk for any pipeline handling untrusted sequence data. Leadership should care because these libraries underpin core scientific and diagnostic workflows, and a single malformed index file could disrupt analyses or processes that teams trust by default.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include validating externally sourced .fai files against their source FASTA before loading, restricting automated ingestion of untrusted index files, isolating HTSlib-consuming processes in sandboxed containers, and monitoring for the vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Low
core bioinformatics library but confined to genomics/research industry use
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.4%
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
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
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.

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