HTSlib through 1.24 contains a heap out-of-bounds write and read vulnerability in bgzf_index_load_hfile() in bgzf.c
Source GCVE Database
Not known to be exploited · CVSS 4.8 Medium.
Data as of 27 Oct 2026, 02:27 UTC
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 26 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| samtoolshtslib | Affected
| Fixed in– |
GitHubhtslibpkg:github/htslibOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Until a fix is available, users should avoid processing untrusted .gzi index files or apply any vendor-recommended mitigations once published.
Description
HTSlib versions through 1.24 have a heap out-of-bounds read and write vulnerability in the function bgzf_index_load_hfile() located in bgzf.c. This flaw allows an attacker to corrupt heap memory by providing a specially crafted .gzi index entry count. Specifically, a count value of 0xFFFFFFFF causes truncation of an internal variable to zero, leading to writes beyond a zero-sized malloc buffer and an out-of-bounds read in bgzf_useek(). This can result in heap corruption or crashes in dependent tools such as samtools and bcftools.
References
- nvd.nist.gov/vuln/detail/CVE-2026-116742 (opens in a new tab)
- github.com/samtools/htslib/issues/2113 (opens in a new tab)
- github.com/samtools/htslib/pull/2057 (opens in a new tab)
- github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873 (opens in a new tab)
- github.com/samtools/htslib (opens in a new tab)
- github.com/samtools/htslib/blob/1.24/bgzf.c (opens in a new tab)
- hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob (opens in a new tab)
- vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count (opens in a new tab)