HTSlib through 1.24 contains a heap out-of-bounds write and read vulnerability in bgzf_index_load_hfile() in bgzf.c
Affects htslibSource GCVE Database
Not known to be exploited · CVSS 4.8 Medium.
Data as of 28 Oct 2026, 22:33 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 |
|---|---|---|
Ubuntu 26.10htslibpkg:deb/ubuntu/htslib?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTShtslibpkg:deb/ubuntu/htslib?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTShtslibpkg:deb/ubuntu/htslib?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTShtslibpkg:deb/ubuntu/htslib?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTShtslibpkg:deb/ubuntu/htslib?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Ubuntu Pro 18.04 LTShtslibpkg:deb/ubuntu/htslib?arch=source&distro=esm-apps/bionicOther 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 use alternative mitigations recommended by the vendor once published.
Description
HTSlib versions through 1.24 contain a heap out-of-bounds write and read vulnerability in the function bgzf_index_load_hfile() within bgzf.c. This flaw allows attackers to corrupt heap memory by providing a crafted .gzi index entry count. Specifically, a count value of 0xFFFFFFFF causes truncation of noffs to zero, leading to writes beyond a malloc(0) buffer and an out-of-bounds read in bgzf_useek(), which can cause heap corruption or crashes in tools such as samtools and bcftools.
References
- ubuntu.com/security/CVE-2026-116742 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-116742 (opens in a new tab)
- github.com/samtools/htslib (opens in a new tab)
- github.com/cveproject/cvelistv5/tree/main/cves/2026/116xxx/cve-2026-116742.json (opens in a new tab)
- github.com/samtools/htslib/blob/1.24/bgzf.c (opens in a new tab)
- github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873 (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)
- hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob (opens in a new tab)
- nvd.nist.gov/vuln/detail/cve-2026-116742 (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)