CVE-2026-31963

HTSlib CRAM reader has heap buffer overflow due to improper validation of input

HIGH
8.1
CVSS Score
Published: March 18, 2026 at 06:22 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.4%
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. 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.

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 exploitAutomatablePartial 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-129CWE-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