CVE-2026-116742
HTSlib through 1.24 contains a heap out-of-bounds write and read …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/samtools/htslib
- github.com/samtools/htslib/blob/1.24/bgzf.c#L2504
- github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873
- github.com/samtools/htslib/issues/2113
- github.com/samtools/htslib/pull/2057
- hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob
- www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gz
- nvd.nist.gov/vuln/detail/CVE-2026-116742
- cve.org/CVERecord?id=CVE-2026-116742
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.