CVE-2026-31965: HTSlib CRAM reader has out-of-bounds reads due to improper validation of input
HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. In the cramdecodeslice() function called while reading CRAM records, validation of the reference id field occurred too late, allowing two out of bounds reads to occur before the invalid data was detected. The bug does allow two values to be leaked to the caller, however as the function reports an error it may be difficult to exploit them. It is also possible that the program will crash due to trying to access invalid memory. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31965?
CVE-2026-31965 has been identified as a high-severity vulnerability due to the risk of out-of-bounds reads.
How do I fix CVE-2026-31965?
To address CVE-2026-31965, users should update HTSlib to version 1.22.2 or later.
Which versions of HTSlib are affected by CVE-2026-31965?
CVE-2026-31965 affects HTSlib versions prior to 1.21.2 and between 1.22 and 1.22.1, as well as version 1.23.
What type of vulnerability is CVE-2026-31965?
CVE-2026-31965 is categorized as an out-of-bounds read vulnerability.
What functions are impacted by CVE-2026-31965 in HTSlib?
The vulnerability in CVE-2026-31965 specifically impacts the cram_decode_slice() function.