CVE-2026-116742
published medium CVSS 4.0 · 4.8HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| samtools | — | htslib0 through 1.24 · Other versions: unaffected | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 4.8 / 10
- Severity
- medium
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 4.4 | medium | VulnCheck · cna | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| samtools | htslib | 0 through 1.24 (affected · custom)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-197 Numeric Truncation Error
References
7- https://github.com/samtools/htslib
- https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504
- Patch Commit https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873
- https://github.com/samtools/htslib/issues/2113
- Pull Request #2057 https://github.com/samtools/htslib/pull/2057
- https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob
- VulnCheck Advisory: HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count
Provider assertions
2VulnCheck · cna
HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 1bb4df08a3b2936030e34d4afa355bd0467eacdd13d29ab9e3a9b871cb70f1d3
- Ingested
- 27 Oct 2026, 14:37:27 UTC
- Source record
- Official CVE record