CVE-2026-31969
8.1Samtools · HTSlib
A heap-based buffer overflow in HTSlib allows attackers to potentially achieve arbitrary code execution via crafted CRAM files that trigger an out-of-bounds write during decoding.
Executive summary
A heap buffer overflow vulnerability in the HTSlib bioinformatics library poses a significant risk of arbitrary code execution when processing malicious CRAM files.
Vulnerability
This is a heap-based buffer overflow (CWE-122) and out-of-bounds write (CWE-787) occurring within the cram_byte_array_stop_decode_char function. The vulnerability is triggered when an unauthenticated user opens a specially crafted CRAM file, leading to memory corruption that may facilitate arbitrary code execution.
Business impact
The vulnerability carries a CVSS score of 8.1, indicating a high level of severity. Successful exploitation allows for unauthorized memory manipulation, which could lead to application crashes, data compromise, or the execution of arbitrary code in the context of the user running the bioinformatics tools. This represents a critical risk to research integrity and system availability.
Remediation
Immediate Action: Update HTSlib to version 1.21.1, 1.22.2, or 1.23.1 to incorporate the necessary security patches.
Proactive Monitoring: Review file access logs for interactions with untrusted or externally sourced bioinformatics data files. Monitor system performance for unexpected crashes or abnormal behavior in applications utilizing HTSlib.
Compensating Controls: Since there is no workaround, prioritize isolating bioinformatics processing tasks to sandboxed environments or restricted user accounts to limit the potential impact of a successful exploit.
Exploitation status
Public Exploit Available: No
Analyst recommendation
Given the potential for arbitrary code execution, this vulnerability should be treated as a high priority for any organization processing genomic or bioinformatics data. Administrators must verify the version of HTSlib currently in use and apply the provided security updates immediately. Do not rely on external file sanitization as a permanent solution.