Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | While a CVSS vector is not provided, the vulnerability exhibits characteristics typical of high-severity issues: it involves out-of-bounds memory reads affecting information confidentiality and system availability. The attack vector is network-based (processing untrusted CRAM files), with low attack complexity (malformed input), and requires no privileges. EPSS score is unavailable, but the presence of three concurrent patch releases across maintenance branches (1.21.1, 1.22.2, 1.23.1) indicates the vendor treated this as a priority issue. No evidence of public exploitation or proof-of-concept code exists. The real-world risk depends on deployment context: production bioinformatics pipelines processing untrusted genomic data face moderate risk, while internal-only deployments processing trusted data face lower risk. The information disclosure aspect is particularly concerning in research contexts where intermediate program states might contain sensitive metadata. |
| Exploit ScenarioDerived | An attacker uploads a specially crafted CRAM file with malformed feature offsets to a bioinformatics service that uses vulnerable HTSlib (e.g., a genome analysis pipeline). When the service processes the file, cram_decode_seq() reads out-of-bounds from the reference buffer, leaking adjacent heap or stack data into the decoded sequence or MD tag output. This leaked data could contain pointer information, API keys stored in memory, or metadata from prior sequence records, which is then returned to the attacker or logged in diagnostic output. Alternatively, the out-of-bounds read triggers a segmentation fault, crashing the service (denial of service). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 18, 2026
HTSlib versions prior to 1.21.1, 1.22.2, and 1.23.1 contain a buffer over-read vulnerability in the CRAM decoder's cram_decode_seq() function that fails to properly validate feature data offsets. An attacker can craft malicious CRAM files to read arbitrary data from memory adjacent to reference sequence buffers, leading to information disclosure of program state or denial of service through memory access violations. No active exploitation has been documented, but patches are available from the vendor.
RemediationAI
Upgrade HTSlib to version 1.23.1 or later (preferred), or to 1.22.2 if remaining on the 1.22.x line, or to 1.21.1 if constrained to the 1.21.x line. Consult https://github.com/samtools/htslib/security/advisories/GHSA-5cj8-mj52-8vp3 for patch details and https://github.com/samtools/htslib/commit/22ec5230ef95769ab009420da69568c7e530af28 and related commits for code changes. There is no documented workaround; patching is mandatory. In environments where rapid patching is infeasible, implement input validation by rejecting CRAM files from untrusted sources and consider using alternative formats pending patch deployment.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HTSlib is a C library (CPE: cpe:2.3:a:samtools:htslib) used across bioinformatics workflows for reading and writing sequence alignment file formats including CRAM. CRAM achieves compression through reference-based encoding: instead of storing full DNA sequences, it stores reference coordinates and a series of 'features' that describe differences from the reference. During decoding, the cram_decode_seq() function copies reference data into output buffers based on feature offsets. The root cause is classified as CWE-125 (Out-of-bounds Read), stemming from insufficient validation of feature data boundaries before memory copy operations. This allows reads from memory locations before the start or after the end of the reference buffer, which can be written into either the sequence output buffer or the MD tag construction buffer.
Know when Htslib gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
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 CRAM records, the reference data is stored in a char array, and parts matching the alignment record sequence are copied over as necessary. Due to insufficient validation of the feature data series, it was possible to make the cram_decode_seq() function copy data from either before the start, or after the end of the stored reference either into the buffer used to store the output sequence for the cram record, or into the buffer used to build the SAM MD tag. This allowed arbitrary data to be leaked to the calling function. 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.
Executive ViewAI
Organizations using HTSlib should be aware of notable risk from CVE-2026-31966, a out-of-bounds read vulnerability rated CVSS 6.9. Exploitation could cause memory corruption or application crashes. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: enable ASLR/DEP, apply network segmentation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Related Vulnerabilities in HTSlib CRAM Decoder Buffer Underread
View all 3An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au
samtools htslib library version 1.4.0 and earlier is vulnerable to buffer overflow in the CRAM rANS codec resulting in p
An issue has been found in HTSlib 1.8. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, n
HTSlib contains a heap buffer overflow vulnerability in its CRAM decoder caused by an out-by-one error when validating f
HTSlib versions prior to 1.23.1, 1.22.2, and 1.21.1 contain a heap buffer overflow vulnerability in the cram_decode_seq(
HTSlib contains a buffer overflow vulnerability in its CRAM format decoder affecting the VARINT and CONST encoding handl
Stack-based buffer overflow in HTSlib's CRAM decoder affects all releases before 1.21.2, 1.22.3, 1.23.2, and 1.24: a cra
Heap out-of-bounds read and write in HTSlib's experimental CRAM v4 XPACK and XRLE decoders allows a remote, unauthentica
Heap buffer overflow in HTSlib's BCF reader allows an attacker-crafted BCF file to corrupt heap memory when opened by an
In HTSlib 1.8, a race condition in cram/cram_io.c might allow local users to overwrite arbitrary files via a symlink att
An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au
HTSlib, a widely-used bioinformatics library for reading and writing sequence alignment formats, contains a critical buf
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allVendor StatusVendor
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| bullseye | vulnerable | 1.11-4 | - |
| bookworm | vulnerable | 1.16+ds-3 | - |
| trixie | vulnerable | 1.21+ds-1 | - |
| forky, sid | vulnerable | 1.22.1+ds2-1 | - |
| (unstable) | fixed | (unfixed) | - |
EUVD-2026-12936
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB