HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
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.
- Products
- htslib
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-116742
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 13:58 UTC · Revision 1
Source evidence
HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count
core-cve · Original sourcePublished 26 Oct 2026, 21:52 UTC
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.
cve:CVE-2026-116742
htslib
Fixed versions: Not specified
Complete source record
{
"id": "092360b6861b09b0247a81971b6031548ef8e605465c29c86d33677a568f2434",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-116742",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "HTSlib through 1.24 Heap Out-of-Bounds Write via Truncated .gzi Index Count",
"summary": "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.",
"evidence": "cve:CVE-2026-116742",
"products": [
{
"name": {
"value": "htslib",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-116742",
"aliases": [
"CVE-2026-116742"
],
"metrics": [
{
"format": "CVSS",
"cvssV4_0": {
"version": "4.0",
"baseScore": 4.8,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"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",
"userInteraction": "PASSIVE",
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"privilegesRequired": "NONE",
"subIntegrityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "LOW",
"subConfidentialityImpact": "NONE",
"vulnConfidentialityImpact": "NONE"
}
},
{
"format": "CVSS",
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.4,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L",
"integrityImpact": "LOW",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "LOW",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
}
}
],
"affected": [
{
"repo": "https://github.com/samtools/htslib",
"vendor": "samtools",
"product": "htslib",
"versions": [
{
"status": "affected",
"version": "0",
"versionType": "custom",
"lessThanOrEqual": "1.24"
}
],
"packageURL": "pkg:github/samtools/htslib",
"defaultStatus": "unaffected"
}
],
"modified": "2026-10-27T14:16:48.820Z",
"provider": "cve",
"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"
],
"provider_metadata": {
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-116742",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-10-27T13:42:04.833817Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-10-27T14:16:48.820Z"
}
}
],
"cna": {
"orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"shortName": "VulnCheck",
"dateUpdated": "2026-10-26T21:52:41.511Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-116742",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 392652,
"published_at": "2026-10-26T21:52:41.511+00:00"
}