Skip to content
OpenAdvisories
Medium · 4.4 CVE-2026-116742 EUVD-2026-110490GHSA-r296-8jjg-794r

HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count

Published Oct 26, 2026 · Updated Oct 27, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
samtools htslib ≤ 1.24 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 htslib No fix yet —
Debian 13 htslib No fix yet —
Debian 12 htslib No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 htslib No fix yet —
Ubuntu 26.04 LTS htslib No fix yet —
Ubuntu 24.04 LTS htslib No fix yet —
Ubuntu 22.04 LTS htslib No fix yet —
Ubuntu 20.04 LTS htslib No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS htslib No fix yet —
Ubuntu Pro 16.04 LTS htslib No fix yet —
Ubuntu Pro 14.04 LTS htslib No fix yet —

References