HTSlib Heap Buffer Overflow Vulnerability in CRAM Reader

Vulnerability

A heap buffer overflow vulnerability has been identified in HTSlib, a library for handling bioinformatics file formats. This issue arises in the CRAM file format, which compresses DNA sequence alignment data. While most records include sequence and quality values, some can omit this information to save space. The vulnerability occurs in the `cram_decode_seq()` function, which improperly manages records lacking sequence data. This mismanagement can lead to reading a byte beyond the end of a heap allocation and writing an attacker-controlled byte to that location. As a result, the vulnerability causes a heap buffer overflow, potentially allowing for arbitrary code execution. The issue is present in HTSlib versions through 1.21, 1.22, and 1.23, and has been patched in versions 1.21.1, 1.22.2, and 1.23.1.

Impact

Exploitation of this vulnerability leads to a heap buffer overflow, causing program crashes or unintended modifications of data and heap structures. Such exploitation may be leveraged to execute arbitrary code.

Remediation

Users can upgrade to HTSlib versions 1.21.1, 1.22.2, or 1.23.1 to address this vulnerability.

Added: Mar 18, 2026, 7:07 PM
Updated: Mar 18, 2026, 7:07 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
3.9
remediation
7.7
relevance
4.1
threat
3.2
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.