Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious CRAM file with overflowing field size
-
DeliveryDeliver to HTSlib-based tool or pipeline
-
ExploitInteger overflow corrupts bounds check in BETA/XPACK decoder
-
ExecutionDecoder reads beyond input buffer
-
ImpactLeak process memory or crash process
Vulnerability Assessment
| Weakness |
CWE
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. |
| Exploitation Conditions | Exploitation requires the target to decode an attacker-supplied CRAM file through HTSlib's affected code paths: the CRAM BETA codec (cram_beta_decode_long/int/char) or the experimental CRAM v4 XPACK codec (cram_xpack_decode_long/int). The flaw is reached when crafted field/bit-count values cause the multiplication in the bounds check to overflow, so a malicious CRAM is the concrete prerequisite - there is no credential, privilege, or special runtime configuration requirement (PR:N/UI:N per CVSS). Limiting factors: the victim must actually ingest and parse the malicious CRAM with a vulnerable HTSlib version (<=1.21.1, <=1.22.2, or <=1.23.1), the XPACK path is an experimental CRAM v4 feature that may be less commonly exercised than BETA, and impact is restricted to a bounded out-of-bounds read (information leak or crash), not memory corruption or code execution. There is no vendor workaround; updating to a fixed release is the only remediation. |
| Impact | This is a genuine but moderate-priority issue, not a top-tier emergency. The CVSS 4.0 score of 6.9 (AV:N/AC:L/AT:N/PR:N/UI:N) reflects remote, low-complexity, unauthenticated reachability with low confidentiality and low availability impact (VC:L/VA:L) and no integrity impact - consistent with an out-of-bounds read (CWE-125, with CWE-129 improper array index validation per the GHSA advisory) that leaks process-state information or crashes the process rather than enabling code execution. The vuln.today decision label is 'this_month', indicating prioritized-but-not-urgent remediation. No CISA KEV entry is present in the input and no EPSS score was provided, so there is no signal of active or probable exploitation; the only references are the fix PR, fix commits, and release tags - i.e., no public exploit code or PoC is present. The AV:N rating is reasonable because HTSlib processes CRAM files that frequently originate from untrusted or remote sources, but exploitation still requires the victim to parse an attacker-crafted CRAM file, so real-world risk is bounded by how exposed a given deployment's parsing surface is. One caveat: the CVSS UI:N rating treats file processing as requiring no user interaction, which is defensible for automated pipelines but understates the fact that some workflow must ingest the malicious file. |
| Exploit ScenarioDerived | An attacker crafts a malicious CRAM file whose BETA-encoded (or experimental CRAM v4 XPACK-encoded) data block carries field sizes that trigger the integer overflow in the multiplied bounds calculation, then delivers it to a genomics pipeline, web service, or workstation that parses it with a vulnerable HTSlib. When the CRAM BETA/XPACK decoder reads past the end of the supplied input buffer, it can leak adjacent process-state memory into output or crash the process. No public exploit identified at time of analysis; only the vendor fix commits and advisory are referenced. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
Out-of-bounds reads in HTSlib's CRAM decoders - the BETA codec (cram_beta_decode_long/int/char) and the experimental CRAM v4 XPACK codec (cram_xpack_decode_long/int) - allow a crafted CRAM file to make the library read past the supplied input buffer, leaking information about process state or crashing the process. All releases up to and including 1.23.1, 1.22.2 and 1.21.1 are vulnerable; fixes ship in 1.24, 1.23.2, 1.22.3 and 1.21.2. There is no public exploit identified at time of analysis and no confirmed active exploitation; because the attacker must get the victim to decode a malicious CRAM and the impact is limited to a read, this is a moderate-priority issue for pipelines that ingest untrusted alignment files, not a code-execution emergency.
RemediationAI
Upgrade to a fixed HTSlib release: 1.24, or the maintenance releases 1.23.2, 1.22.3 or 1.21.2 for the corresponding branch, available from https://github.com/samtools/htslib/releases/tag/1.24, /1.23.2, /1.22.3 and /1.21.2. Because HTSlib is usually compiled into tools such as samtools, rebuild and redeploy every bundled downstream binary rather than only updating the shared library, and confirm with the vendor that the bundled copy is at a fixed version. The upstream advisory (https://github.com/samtools/htslib/security/advisories/GHSA-rjqv-xg3q-g423) states there is no workaround, so patching is the only complete fix; the relevant code changes are in https://github.com/samtools/htslib/pull/2046 and commits 3eb519cd8a9be35275db46a439eb158e70fe415f, 3eef4aece30bc008b251e377085fc944d008d06a and a3e8dca14dcfdc6167281721ede6d6ecd3395bad. While remediation is scheduled, exposure can be reduced by not feeding CRAM files from untrusted or unvetted sources into vulnerable installations until the upgrade is in place.
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
CRAM is the compressed DNA sequence-alignment format used across the samtools/htslib bioinformatics stack; field values inside a CRAM block are bit-packed and decoded by per-encoding codecs. The affected BETA codec and the experimental CRAM v4 XPACK codec validate the remaining input with cram_not_enough_bits(), which historically computed the required bit count as the int expression c->u.beta.nbits * n (and the XPACK equivalents) and rejected negative results. With a large attacker-controlled element count (n = *out_size) and bit width, that multiplication overflows a signed 32-bit int, so the bounds check passes even though the buffer is too small, and the decode loop then reads beyond the end of the input block. The upstream fix (PR #2046, commits 3eb519cd, 3eef4aec, a3e8dca1) widens the counter to uint32_t, promotes the multiplication to uint64_t and changes cram_not_enough_bits() to take a uint64_t nbits, removing the sign-based check; the same pull request adds BAM_MAX_QNAME_LEN (254) validation and truncation in the CRAM-to-BAM path and hardens reference-end bookkeeping in the encoder. The weakness is classified CWE-125 (out-of-bounds read), with the GitHub advisory also citing CWE-129 (improper validation of array index); the effect is a bounded over-read of adjacent memory, which can surface as a stale-memory disclosure or an invalid-access crash.
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
CRAM files routinely arrive from untrusted/remote sources (AV:N), the overflow triggers deterministically on crafted input (AC:L), no auth or interaction is modeled (PR:N/UI:N), and the OOB read yields only a memory leak (C:L) and possible crash (A:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
HTSlib is a library for reading and writing bioinformatics file formats. Prior to 1.21.2, 1.22.3, 1.23.2, and 1.24, the CRAM BETA decoder functions cram_beta_decode_long, cram_beta_decode_int, and cram_beta_decode_char, and the experimental CRAM v4 XPACK functions cram_xpack_decode_long and cram_xpack_decode_int, have bounds-checking flaws caused by integer overflow after a multiplication. The resulting incorrect bounds check can allow decoding to read beyond the supplied input buffer, potentially leaking process-state information or crashing the process. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.
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.
An 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
EUVD-2026-130324
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB