Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted FASTA .fai index
-
DeliveryVictim pipeline calls fai_retrieve
-
ExploitUndersized heap buffer allocated
-
ExecutionOne-byte out-of-bounds write
-
ImpactHeap 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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-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.
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, 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
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.
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
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.
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-130307
NVD
CVE.org
EPSS
GitHub
Exploit-DB