Out-of-bounds Read Affecting htslib package, versions <1.24-2


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.5% (44th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-HTSLIB-15704548
  • published20 Mar 2026
  • disclosed18 Mar 2026

Introduced: 18 Mar 2026

CVE-2026-31967  (opens in a new tab)
CWE-125  (opens in a new tab)
CWE-129  (opens in a new tab)

How to fix?

Upgrade Debian:unstable htslib to version 1.24-2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream htslib package and not the htslib package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. In the cram_decode_slice() function called while reading CRAM records, the value of the mate reference id field was not validated. Later use of this value, for example when converting the data to SAM format, could result in the out of bounds array reads when looking up the corresponding reference name. If the array value obtained also happened to be a valid pointer, it would be interpreted as a string and an attempt would be made to write the data as part of the SAM record. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt 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.

CVSS Base Scores

version 3.1