Heap Buffer Overflow in HTSlib Affecting Samtools and Bioinformatics Software
CVE-2026-31962
8.8HIGH
What is CVE-2026-31962?
HTSlib, a library for managing bioinformatics file formats, contains a heap buffer overflow vulnerability resulting from improper handling of CRAM format alignment records. This flaw allows an attacker to read a single byte from beyond the end of a heap allocation and write a controllable byte to that same memory location. As a consequence, if a specially crafted file is opened by a user, it could lead to program crashes or unexpected modifications of data and heap structures. In some scenarios, this vulnerability may enable arbitrary code execution, underscoring the significant risk it poses to systems relying on HTSlib for processing bioinformatics data.
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
