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 no CVSS score or EPSS probability was provided in available intelligence, the vulnerability warrants high priority based on multiple factors: CWE-125 (out-of-bounds read) is a well-known memory safety issue with high exploitability; the attack vector is local/file-based (malicious CRAM input), minimizing complexity; and the impact includes both information disclosure (program state leakage) and denial of service. HTSlib is a foundational library used in bioinformatics pipelines across research institutions and clinical genomics workflows, amplifying the affected user base. The absence of a workaround and the existence of a public patch (commit 9cefb46453ad471e933b8212d4f45920524d3357) indicate this was a genuine security gap. The fact that patches were backported across multiple stable branches (1.23.1, 1.22.2, 1.21.1) suggests vendor commitment to rapid remediation and recognition of the issue's importance. |
| Exploit ScenarioDerived | An attacker crafts a malicious CRAM file with an out-of-range mate reference ID value and distributes it as part of a genomic dataset or submits it to a variant calling pipeline. When a vulnerable HTSlib-based tool processes the file and converts CRAM output to SAM format, the invalid index causes an out-of-bounds read into the reference array. If the out-of-bounds memory location happens to point to a valid heap or stack address containing data, that data is interpreted as a string and written to the SAM output file, leaking sensitive information such as command-line arguments, environment variables, or heap contents. Alternatively, the out-of-bounds access may reference unmapped memory, triggering a segmentation fault and crashing the pipeline. |
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.23.1, 1.22.2, and 1.21.1 contain an out-of-bounds read vulnerability in the CRAM file parser where the mate reference ID field is not validated during decoding. An attacker can craft a malicious CRAM file that, when processed by affected applications (particularly those converting CRAM to SAM format), triggers out-of-bounds array access that may leak sensitive information about program state or cause a denial of service through memory access violations. No public exploit has been reported, but no workaround exists, making patching essential.
RemediationAI
Immediately upgrade HTSlib to version 1.23.1, 1.22.2, or 1.21.1 or later, depending on your deployed version branch (see https://github.com/samtools/htslib/security/advisories/GHSA-33x5-c6vj-8f2w for version mapping). Patch is available in commit 9cefb46453ad471e933b8212d4f45920524d3357. No workaround exists, so patching is mandatory. For organizations unable to upgrade immediately, restrict processing of CRAM files to trusted, validated sources and implement input validation at the application layer if feasible. Verify that all dependent tools (samtools, variant callers, alignment tools) are rebuilt against the patched HTSlib version.
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 (cpe:2.3:a:samtools:htslib:*:*:*:*:*:*:*:*) is a widely-used C library for reading and writing bioinformatics file formats including CRAM (Compression of Alignment Mapping). The vulnerability exists in the cram_decode_slice() function, which parses CRAM compressed DNA sequence alignment data. The root cause is classified as CWE-125 (Out-of-bounds Read) where the mate reference ID field—an index into a reference sequence array—is not bounds-checked before use. Later operations such as SAM format conversion use this unchecked index to look up reference names, resulting in arbitrary array access. If the out-of-bounds memory location contains a valid pointer, it may be interpreted as a string and written into SAM output, creating an information disclosure channel.
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. In the cram_decode_slice() function called while reading CRAM records, the value of the mate reference id field was not validated. Later use of this value, for example when converting the data to SAM format, could result in the out of bounds array reads when looking up the corresponding reference name. If the array value obtained also happened to be a valid pointer, it would be interpreted as a string and an attempt would be made to write the data as part of the SAM record. 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-31967, 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
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 Denial Of Service
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-12938
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB