CVE-2026-116742
HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
- State
- Published
- Severity
- 4.8 Medium
- Published
- Oct 26, 2026
- Updated
- Oct 27, 2026
- Reserved
- Oct 26, 2026
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 4.8 Medium | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N | VulnCheck |
| 3.1 | 4.4 Medium | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L | VulnCheck |
Weaknesses
- CWE-197 Numeric Truncation Error
Affected Products
| Product | Versions |
|---|---|
htslibsamtools |
|
References
- Pull Request #2057issue-trackingpatch
- Patch Commitpatch
- 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
- VulnCheck Advisory: HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Countthird-party-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.