CVE-2026-31971HIGH 8.1EPSS p25.2%

CVE-2026-31971CVE-2026-31971

Description

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. When reading data encoded using the `BYTE_ARRAY_LEN` method, the `cram_byte_array_len_decode()` failed to validate that the amount of data being unpacked matched the size of the output buffer where it was to be stored. Depending on the data series being read, this could result either in a heap or a stack overflow with attacker-controlled bytes. Depending on the data stream this could result either in a heap buffer overflow or a stack overflow. If a user opens a file crafted to exploit this issue it could lead to the program crashing, overwriting of data structures on the heap or stack in ways not expected by the program, or changing the control flow of 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.

Scoring

CVSS 3.18.1 (HIGH)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
EPSS0.34% probability of exploitation · percentile 25.2% · 2026-06-19T12:03:05Z
Published2026-03-18
Last modified2026-03-19

Underlying weaknesses· 4

CWE-121CWE-122CWE-787CWE-1284

References

  1. https://github.com/samtools/htslib/commit/01cd003b46fa2ebea4d9be5475b11217eb4c11be
  2. https://github.com/samtools/htslib/security/advisories/GHSA-jvx4-4wq7-6fmh

4

TypeTargetConfidenceTier
WeaknessStack-based Buffer Overflowcwe-1210%live
WeaknessHeap-based Buffer Overflowcwe-1220%live
WeaknessImproper Validation of Specified Quantity in Inputcwe-12840%live
WeaknessOut-of-bounds Writecwe-7870%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CVE
CVE-2026-31969
CVE
CVE-2026-31962
CVE
CVE-2026-31963
CVE
CVE-2026-31968
CVE
CVE-2026-31966
CVE
CVE-2026-31965
Sourced from NVD + FIRST.org EPSS. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.