{"id":"CVE-2026-116742","aliases":["DEBIAN-CVE-2026-116742","EUVD-2026-110490","GHSA-r296-8jjg-794r","UBUNTU-CVE-2026-116742"],"status":"published","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.","severity":{"version":"4.0","score":4.8,"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00123,"percentile":0.02123,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-197"],"published":"2026-10-26T21:52:41Z","modified":"2026-10-29T09:00:06Z","affected":[{"source":"osv","ecosystem":"Debian:12","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.16+ds-3","1.17+ds-0+exp1","1.17+ds-1","1.18+ds-0+exp1","1.18+ds-1","1.19+ds-0+exp0","1.19+ds-1","1.19+ds-1+exp1","1.19+ds-1.1","1.20+ds-1","1.20+ds-2","1.21+ds-0+exp1","1.21+ds-0+exp2","1.21+ds-1","1.22.1+ds-1","1.22.1+ds-2","1.22.1+ds2-1","1.24-1","1.24-2","1.24-3"]},{"source":"osv","ecosystem":"Debian:13","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21+ds-1","1.22.1+ds-1","1.22.1+ds-2","1.22.1+ds2-1","1.24-1","1.24-2","1.24-3"]},{"source":"osv","ecosystem":"Debian:14","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21+ds-1","1.22.1+ds-1","1.22.1+ds-2","1.22.1+ds2-1","1.24-1","1.24-2","1.24-3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.2.0~rc3-1","0.2.0~rc3-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.2.1-1","1.2.1-2","1.2.1-2ubuntu1","1.2.1-2ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5-1","1.5-4ubuntu1","1.6-3ubuntu1","1.6-4","1.6-4build1","1.7-2","1.7-2ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9-10","1.9-11","1.9-12","1.10.2-2ubuntu1","1.10.2-2ubuntu2","1.10.2-3","1.10.2-3ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13+ds-2","1.13+ds-2build1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.17+ds-1","1.18+ds-1","1.19+ds-1.1build2","1.19+ds-1.1build3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.22.1+ds2-1","1.22.1+ds2-1build1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"htslib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.21+ds-1","1.22.1+ds2-1"]}],"products":[{"vendor":"samtools","product":"htslib"}],"references":[{"url":"https://github.com/samtools/htslib/pull/2057","tags":["issue-tracking","patch","fix","report"]},{"url":"https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873","tags":["patch","fix","report"]},{"url":"https://github.com/samtools/htslib","tags":["product","package","report"]},{"url":"https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504","tags":["technical-description","article"]},{"url":"https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob","tags":["third-party-advisory","advisory","report"]},{"url":"https://github.com/samtools/htslib/issues/2113","tags":["issue-tracking","report"]},{"url":"https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count","tags":["third-party-advisory","advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116742","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-r296-8jjg-794r"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/116xxx/CVE-2026-116742.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-116742","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-116742","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-116742","tags":["report"]},{"url":"https://github.com/cveproject/cvelistv5/tree/main/cves/2026/116xxx/cve-2026-116742.json","tags":["report"]},{"url":"https://github.com/samtools/htslib/blob/1.24/bgzf.c#l2504","tags":["report"]},{"url":"https://nvd.nist.gov/vuln/detail/cve-2026-116742","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-116742","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.","status":"published","published":"2026-10-26T21:52:41.511Z","modified":"2026-10-27T14:16:48.82Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium","assessor":"cna"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-197"],"updated_at":"2026-11-02T14:20:03.827373Z"}],"euvd":[{"id":"EUVD-2026-110490","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.","status":"published","published":"2026-10-26T21:52:41Z","modified":"2026-10-27T14:16:48Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium"}],"updated_at":"2026-11-02T16:59:23.601588Z"}],"ghsa":[{"id":"GHSA-r296-8jjg-794r","title":"HTSlib through 1.24 contains a heap out-of-bounds write and read vulnerability in...","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.","status":"published","published":"2026-10-27T00:32:48Z","modified":"2026-10-27T00:32:54Z","cvss":[{"version":"4.0","score":4.8,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","level":"medium"}],"cwes":["CWE-197"],"updated_at":"2026-11-02T15:14:27.349207Z"}],"nvd":[{"id":"CVE-2026-116742","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.","status":"published","published":"2026-10-26T22:16:58.68Z","modified":"2026-10-27T16:04:22.707Z","cvss":[{"version":"4.0","score":4.8,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-197"],"updated_at":"2026-11-02T14:13:03.746397Z"}],"osv":[{"id":"CVE-2026-116742","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.","status":"published","published":"2026-10-26T21:52:41.511Z","modified":"2026-10-29T07:23:01.324078832Z","cvss":[{"version":"4.0","score":4.8,"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","level":"medium"}],"cwes":["CWE-197"],"updated_at":"2026-11-02T15:44:56.675758Z"},{"id":"DEBIAN-CVE-2026-116742","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.","status":"published","published":"2026-10-26T22:16:58.68Z","modified":"2026-10-29T09:00:06.281946687Z","cvss":[{"version":"4.0","score":4.8,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"}],"updated_at":"2026-11-02T15:45:50.923612Z"},{"id":"UBUNTU-CVE-2026-116742","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.","status":"published","published":"2026-10-26T22:16:00Z","modified":"2026-10-28T20:17:46.301628851Z","cvss":[{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","level":"medium"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","level":"medium"},{"version":"4.0","score":4.8,"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","level":"medium"},{"version":"4.0","score":4.8,"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","level":"medium"}],"updated_at":"2026-11-02T16:56:00.081948Z"}]}}
