CVE-2026-116742
HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
CVSS Score
4.4
EPSS Score
0.0%
EPSS Percentile
0th
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.
| CWE | CWE-197 |
| Vendor | samtools |
| Product | htslib |
| Published | Oct 26, 2026 |
Stay Ahead of the Next One
Get instant alerts for samtools htslib
Be the first to know when new medium vulnerabilities affecting samtools htslib are published โ delivered to Slack, Telegram or Discord.
Get Free Alerts โ
Free ยท No credit card ยท 60 sec setup
CVSS v3 Breakdown
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low
Affected Versions
samtools / htslib
0 โค 1.24
References
github.com: https://github.com/samtools/htslib/pull/2057 github.com: https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873 github.com: https://github.com/samtools/htslib github.com: https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504 hackmd.io: https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob github.com: https://github.com/samtools/htslib/issues/2113 vulncheck.com: https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count
Credits
HaiND from the Post and Telecommunication Institute of Technology daviesrob