Heap-based Buffer Overflow Affecting htslib package, versions *


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

EPSS
0.41% (37th 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-ECHOLATEST-HTSLIB-21816900
  • published29 Oct 2026
  • disclosed18 Mar 2026

Introduced: 18 Mar 2026

CVE-2026-31963  (opens in a new tab)
CWE-122  (opens in a new tab)
CWE-129  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

There is no fixed version for Echo:latest htslib.

NVD Description

Note: Versions mentioned in the description apply only to the upstream htslib package and not the htslib package as distributed by Echo. See How to fix? for Echo:latest 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. As one method of removing redundant data, CRAM uses reference-based compression so that instead of storing the full sequence for each alignment record it stores a location in an external reference sequence along with a list of differences to the reference at that location as a sequence of "features". When decoding these features, an out-by-one error in a test for CRAM features that appear beyond the extent of the CRAM record sequence could result in an invalid write of one attacker-controlled byte beyond the end of a heap buffer. Exploiting this bug causes a heap buffer overflow. If a user opens a file crafted to exploit this issue, it could lead to the program crashing, or overwriting of data and heap structures in ways not expected by the program. It may be possible to use this to obtain arbitrary code execution. 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