{"id":"CVE-2026-116742","state":"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.","publishedAt":"2026-10-26T21:52:41.511Z","updatedAt":"2026-10-27T14:16:48.820Z","severity":{"score":4.8,"label":"Medium","version":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["samtools htslib"],"affected":[{"vendor":"samtools","product":"htslib","packageURL":"pkg:github/samtools/htslib","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"1.24","versionType":"custom"}],"repo":"https://github.com/samtools/htslib"}],"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"],"weaknesses":["CWE-197"],"ingestedAt":"2026-10-29T20:10:43.281Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/116xxx/CVE-2026-116742.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-116742","state":"PUBLISHED","datePublished":"2026-10-26T21:52:41.511Z","dateUpdated":"2026-10-27T14:16:48.820Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-10-26T20:23:36.636Z"},"containers":{"cna":{"title":"HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"samtools","product":"htslib","packageURL":"pkg:github/samtools/htslib","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"1.24","versionType":"custom"}],"repo":"https://github.com/samtools/htslib"}],"references":[{"url":"https://github.com/samtools/htslib/pull/2057","tags":["issue-tracking","patch"],"name":"Pull Request #2057"},{"url":"https://github.com/samtools/htslib/commit/18dddf02bb2c0053b32acec427723555a24b2873","tags":["patch"],"name":"Patch Commit"},{"url":"https://github.com/samtools/htslib","tags":["product"]},{"url":"https://github.com/samtools/htslib/blob/1.24/bgzf.c#L2504","tags":["technical-description"]},{"url":"https://hackmd.io/@haindpwn/htslib-bgzf-gzi-int-truncation-oob","tags":["third-party-advisory"]},{"url":"https://github.com/samtools/htslib/issues/2113","tags":["issue-tracking"]},{"url":"https://www.vulncheck.com/advisories/htslib-through-1.24-heap-out-of-bounds-write-via-truncated-gzi-index-count","name":"VulnCheck Advisory: HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"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","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"LOW","baseScore":4.4,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-197","lang":"en","description":"Numeric Truncation Error","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-26T21:52:41.511Z"},"datePublic":"2026-07-31T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:*","versionEndIncluding":"1.24"}]}]}],"credits":[{"lang":"en","value":"HaiND from the Post and Telecommunication Institute of Technology","type":"finder"},{"lang":"en","value":"daviesrob","type":"remediation developer"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-27T13:42:04.833817Z","id":"CVE-2026-116742","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-27T14:16:48.820Z"}}]}}}