CVE-2026-31967
Out-of-Bounds Read in HTSlib CRAM Causes Info Leak, Crash
Publication date: 2026-03-18
Last updated on: 2026-03-19
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| htslib | htslib | to 1.21.1 (exc) |
| htslib | htslib | From 1.22 (inc) to 1.22.2 (exc) |
| htslib | htslib | 1.23 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-125 | The product reads data past the end, or before the beginning, of the intended buffer. |
| CWE-129 | The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2026-31967 is a vulnerability in HTSlib, a bioinformatics library used for reading and writing DNA sequence alignment file formats. The issue occurs in the function `cram_decode_slice()` when reading CRAM records, where the 'mate reference id' field is not properly validated."}, {'type': 'paragraph', 'content': 'Because this value is not checked, it can cause out-of-bounds array reads when the program tries to look up the corresponding reference name during conversion to SAM format. If the out-of-bounds value points to valid memory, it may be interpreted as a string and written into the SAM record unintentionally.'}, {'type': 'paragraph', 'content': 'This can lead to leakage of program state information or cause the program to crash due to invalid memory access.'}] [1]
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': "This vulnerability can impact you by potentially leaking sensitive information about the program's internal state through unintended data disclosure."}, {'type': 'paragraph', 'content': 'Additionally, it may cause the program using HTSlib to crash due to attempts to access invalid memory, which can disrupt normal operations.'}, {'type': 'paragraph', 'content': 'The vulnerability can be exploited remotely without any privileges or user interaction, making it easier for attackers to cause these impacts.'}] [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade HTSlib to a fixed version. The versions that include fixes are 1.21.1, 1.22.2, and 1.23.1.
There are no known workarounds for this issue, so applying the update is the only effective immediate step.