Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted BCF file to target
-
DeliveryVulnerable HTSlib BCF reader parses record
-
ExploitInteger overflow bypasses record-length check
-
ExecutionOut-of-bounds heap read and constrained write
-
ImpactCrash, heap corruption, or possible 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 parse an attacker-crafted BCF record through HTSlib's BCF reader in an affected version (<= 1.21.1, 1.22.2, 1.23.1, or any release before 1.24); the crafted record uses item counts that overflow the length check in bcf_record_check. No authentication is required (PR:N). Limiting factors: the attacker must get a malicious BCF file processed by the victim - in interactive bioinformatics tools this means a user opens the file, while automated genomics pipelines that ingest untrusted BCF inputs remove that interaction requirement; only the BCF reading code path is affected, and the out-of-bounds write is constrained to setting the least significant bit of accessed bytes, which bounds the corruption primitive. The vendor states there is no workaround, so only upgrading to a fixed version removes exposure. |
| Impact | The input CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L, 8.8) frames this as a network-reachable, low-complexity, unauthenticated flaw with high integrity impact and no confidentiality impact - consistent with a memory-corruption bug in a file parser rather than a data-disclosure issue. The practical attack vector is parsing an attacker-crafted BCF file, which in interactive tools requires a user to open the file but in automated genomics pipelines happens with no human interaction, effectively supporting the UI:N rating in that deployment mode. No EPSS score and no CISA KEV entry were provided, and the vulnerability is not listed as actively exploited; the supplied references are the vendor advisory, fix PR #2047, fix commits, and release tags - i.e. patch material, not exploit code - so this is no public exploit identified at time of analysis, not weaponized or in-the-wild. Arbitrary code execution is described by the vendor only as a possibility ('may be possible'), and the out-of-bounds write is constrained (it sets the least significant bit of accessed bytes), so the realistic confirmed impact is crash, data/heap corruption, and possible but unproven RCE. Overall this is a genuine but not emergency priority: the vuln.today Decision label is this_week, there is no evidence of exploitation, and the right action is to patch within the coming week, matching that label. Note conflict worth flagging: the official vector rates VC:N despite an out-of-bounds read that could in principle leak heap data - verify confidentiality scoring with the vendor if information disclosure is a concern. |
| Exploit ScenarioDerived | An attacker distributes a maliciously crafted BCF file - for example as a shared variant-call dataset or as input to a shared/automated genomics pipeline - to a target running a vulnerable HTSlib (<= 1.21.1, 1.22.2, 1.23.1, or < 1.24). When the BCF reader parses the record, an integer overflow bypasses the record-length check, producing out-of-bounds heap reads and a constrained out-of-bounds write that can crash the process, corrupt heap data, and potentially lead to code execution. No public exploit was identified; the only available code references are the vendor's fix commits and advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Heap buffer overflow in HTSlib's BCF reader allows an attacker-crafted BCF file to corrupt heap memory when opened by an affected version (<= 1.21.1, 1.22.2, 1.23.1, or any release before 1.24). The flaw is an integer overflow in the record-length check inside bcf_record_check(), which lets a record bypass validation so the parser reads past the stored data and, when it sets the least significant bit of each accessed byte, writes past the heap buffer - crashing the process, corrupting data and heap structures, and potentially enabling arbitrary code execution. The CVSS 4.0 vector scores this 8.8 (AV:N/AC:L/PR:N/UI:N/VI:H/VA:L), and the independently assessed CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:R with high integrity and low availability impact and no confidentiality impact; exploitation is unauthenticated but in interactive tools requires the victim to open a malicious BCF file, while automated genomics pipelines ingesting untrusted BCF inputs remove that interaction step. No public exploit code and no CISA KEV entry were identified at time of analysis; the priority label is this_week.
RemediationAI
Upgrade HTSlib to 1.21.2, 1.22.3, 1.23.2 or 1.24 on the matching branch; these are the vendor-released fixed versions and the commit set is 00a30cdb8db1f5832eb58a799383a462c6b58cb3, 2713f39242f4afff5382aad5c1ba02abe12950cd and 3a3585dc844f7caad266bbec8d91e45c09c1dcd4 via PR https://github.com/samtools/htslib/pull/2047. Because downstream tools statically or dynamically link libhts, rebuilding samtools, bcftools and any in-house pipeline binaries against a fixed HTSlib is required - updating only the library package leaves previously built binaries vulnerable. The vendor advisory (https://github.com/samtools/htslib/security/advisories/GHSA-2wm6-8hgm-7g92) explicitly states there is no workaround for this issue, so upgrading to a fixed version is the only complete fix; exposure cannot be removed by configuration changes, and BCF inputs from untrusted or third-party sources remain unsafe until every parsing component is rebuilt on a patched release.
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
BCF is the binary counterpart of VCF, the standard format for storing genomic variant data, and HTSlib is the reference C library used by samtools, bcftools and many downstream bioinformatics pipelines to read and write it. The vulnerable code lives in bcf_record_check() in vcf.c, which validates that a decoded record actually contains enough bytes to account for the number and size of the items it claims to store. The original expression computed the expected size as ((size_t) num << bcf_type_shift[type]) * rec->n_sample; because the per-item size shift and the sample count are multiplied without bounding the intermediate result, a crafted record with oversized item counts overflows the computation, the subsequent end - ptr < bytes bounds check is defeated, and the reader proceeds to access memory beyond the stored record. The write primitive arises because the reader sets the least significant bit of each accessed byte (the BCF genotype encoding trick), so out-of-bounds accesses become out-of-bounds modifications rather than reads alone. This maps to CWE-190 (integer overflow) as the root cause, cascading into CWE-1284 (improper validation of specified quantity), CWE-125 (out-of-bounds read), CWE-787 (out-of-bounds write) and CWE-122 (heap-based buffer overflow). The upstream fix in PR #2047 widens the multiplication to uint64_t, enforces a 2 GiB limit on FORMAT data items per key before shifting (ndata > (INT_MAX >> bcf_type_shift[type]) routes to a new too_many_indiv error path), and only then computes bytes, noting that the BCF format's l_indiv field already caps total FORMAT data at 4 GiB.
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:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
Network-deliverable crafted file parsed with low complexity and no auth (AV:N/AC:L/PR:N); a user/pipeline must open the file (UI:R); constrained LSB heap write gives I:H, crashes give A:L, no direct confidentiality impact.
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, the BCF reader can experience an integer overflow in a record-length check that verifies whether a record contains enough bytes for the expected number and size of stored items. A crafted BCF record can bypass this check, causing reads beyond the stored data and, in some cases, writes beyond the heap buffer when the reader sets the least significant bit of accessed bytes. Opening such a file can crash the process, corrupt data or heap structures, and may 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
Class: integer overflow (CWE-190) that defeats a bounds check, yielding out-of-bounds read (CWE-125) and, critically, out-of-bounds write (CWE-787) - i.e.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A heap memory corruption flaw in HTSlib, the widely embedded library behind common genomics file-processing tools, can be triggered when an affected installation opens a maliciously crafted BCF file. Organizations running genomics analysis pipelines or interactive bioinformatics tools that ingest BCF inputs from external or untrusted sources face risk of data corruption, process crashes, and potential arbitrary code execution, with automated pipelines exposed without any user interaction.
No vendor-released patch identified at time of analysis. Interim mitigations: only process BCF files from trusted, verified sources; validate file provenance and checksums before ingestion; run BCF processing in sandboxed, least-privilege containers or isolated hosts; disable automated ingestion of external BCF inputs where possible; monitor for crashes or anomalous behavior in genomics pipelines as an indicator of malformed input.
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.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
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
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
EUVD-2026-130349
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB