Vulnerability · Published Oct 26, 2026 · Assigned by VulnCheck
CVE-2026-116742HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
Medium 4.4
In plain English
A medium-severity security flaw in htslib from samtools. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 2% of all known vulnerabilities).
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | htslib | no fix listed | DEBIAN-CVE-2026-116742 |
| Debian:13 | htslib | no fix listed | DEBIAN-CVE-2026-116742 |
| Debian:14 | htslib | no fix listed | DEBIAN-CVE-2026-116742 |
| Ubuntu:22.04:LTS | htslib | no fix listed | UBUNTU-CVE-2026-116742 |
| Ubuntu:24.04:LTS | htslib | no fix listed | UBUNTU-CVE-2026-116742 |
| Ubuntu:26.04:LTS | htslib | no fix listed | UBUNTU-CVE-2026-116742 |
| Ubuntu:26.10 | htslib | no fix listed | UBUNTU-CVE-2026-116742 |
Affected products (as reported)
Weakness: CWE-197 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
References
- Pull Request #2057 issue-tracking, patch
- Patch Commit patch
- https://github.com/samtools/htslib product
- https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504 technical-description
- https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob third-party-advisory
- https://github.com/samtools/htslib/issues/2113 issue-tracking
- VulnCheck Advisory: HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count third-party-advisory