Heap Buffer Overflow in HTSlib Affecting Bioinformatics Applications
CVE-2026-31970

7.1HIGH

Key Information:

Vendor

Samtools

Status
Vendor
CVE Published:
18 March 2026

What is CVE-2026-31970?

HTSlib, a widely used library for reading and writing bioinformatics file formats, has a vulnerability in its GZI file loading function, which can lead to an integer overflow. When bgzf_index_load_hfile() processes GZI index files, the buffer allocated to store the index may be undersized, leading to potential heap corruption due to unintended memory writes. If an attacker crafts a malicious GZI index file, it could result in a program crash or manipulation of application memory, which may allow for arbitrary code execution. Users are advised to remove GZI index files from untrusted sources and utilize the bgzip -r command to regenerate these files securely.

Affected Version(s)

htslib < 1.21.1 < 1.21.1

htslib >= 1.22, < 1.22.2 < 1.22, 1.22.2

htslib = 1.23 = 1.23

References

CVSS V4

Score:
7.1
Severity:
HIGH
Confidentiality:
None
Integrity:
High
Availability:
Low
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.