Vulnerability in Samtools Htslib
CVE-2026-116742
HTSlib through 1.24 contains a heap out-of-bounds write and read vulnerability in bgzf_index_load_hfile() in bgzf.c that allows attackers to corrupt heap memory by supplying a crafted .gzi index entry count. A count of 0xFFFFFFFF truncates noffs to zero, causing writes past a malloc(0) buffer and an offs[-1] read in bgzf_useek(), resulting in heap corruption or crashes in tools like samtools and bcftools.
Published .
CVSS v3 metric
CVSS v3 base score 4.4 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L.
EPSS exploit prediction
No EPSS score from FIRST.org yet. New CVEs usually get one within a few days; no score means no signal yet, not low risk. How EPSS works.
Affected products
Weakness classification (CWE)
References
- github.com/samtools/htslib/pull/2057 (issue-tracking, patch)
- github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873 (patch)
- github.com/samtools/htslib (product)
- github.com/samtools/htslib/blob/1.24/bgzf.c (technical-description)
- hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob (third-party-advisory)
- github.com/samtools/htslib/issues/2113 (issue-tracking)
- www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-t… (third-party-advisory)
Frequently asked questions
- What is CVE-2026-116742?
- CVE-2026-116742 is a medium-severity vulnerability in Samtools Htslib, classified under CWE-197. CVSS score: 4.4/10. Published 2026-10-26.
- How severe is CVE-2026-116742?
- Medium severity. CVSS v3 base score is 4.4 out of 10.