HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
CVE-2026-116742Published 26 Oct 2026, 21:52 UTC
Real-world risk
0.9/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
4.8
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from VulnCheck)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| htslibNiche | <= 1.24 | — |
What to do
Check the vendor advisory in the references below for fixed versions and workarounds.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.2% chance of exploitation in 30 days (percentile 5), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.350
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.35 × threat 0.850.892
- Rounded to one decimal between 0.1 and 100.9
Exploitation and evidence timeline
- 26 Oct 2026 Published
- 3 Dec 2026 Risk 0.9 (cvss fallback)
Weakness
CWE-197
References
- https://github.com/samtools/htslib/pull/2057issue-tracking, patch
- https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873patch
- https://github.com/samtools/htslibproduct
- https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504technical-description
- https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oobthird-party-advisory
- https://github.com/samtools/htslib/issues/2113issue-tracking
- https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-countthird-party-advisory
- CVE-2026-116742 on CVE.org