{"id":"CVE-2026-116742","revision":"dfaf9171ee4542bb857e631818ee704e","records":[{"revision":"dfaf9171ee4542bb857e631818ee704e","observedAt":"2026-10-26T22:35:30.956+00:00","statement":{"source":"cve-program","id":"CVE-2026-116742","aliases":[],"title":"HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count","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.","state":0,"publishedAt":"2026-10-26T21:52:41.511+00:00","modifiedAt":"2026-10-26T21:52:41.511+00:00","affected":[{"ecosystem":"Vendor product","name":"htslib","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"samtools\",\n                    \"product\": \"htslib\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"custom\",\n                            \"lessThanOrEqual\": \"1.24\"\n                        }\n                    ],\n                    \"packageURL\": \"pkg:github/samtools/htslib\",\n                    \"repo\": \"https://github.com/samtools/htslib\"\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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","score":4.8,"severity":"MEDIUM"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","score":4.4,"severity":"MEDIUM"}],"references":["https://github.com/samtools/htslib/pull/2057","https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873","https://github.com/samtools/htslib","https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504","https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob","https://github.com/samtools/htslib/issues/2113","https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-116742","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-116742","identifiers":["CVE-2026-116742"]},"retained":false,"historicalAffected":[]}],"coverage":[]}