CVE-2026-31969

HTSlib CRAM decoder has a heap buffer overflow

HIGH
8.1
CVSS Score
Published: March 18, 2026 at 07:47 PM UTC
Updated: June 17, 2026 at 10:34 AM UTC
2 products affected across 2 vendorsHtslibHTSlib

Using htslib by samtools?

Get instant alerts when new vulnerabilities affect htslib - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.1
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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_STOP` method, an out-by-one error in the `cram_byte_array_stop_decode_char()` function check for a full output buffer could result in a single attacker-controlled byte being written beyond the end of a heap allocation. 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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.21.11.22 ≤ v < 1.22.21.23
v < 1.21.1v < 1.22.2= 1.23
Affected range stops below 1.21.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.22.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-122CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card