Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft CRAM record with overlong query name
-
DeliveryDeliver file to victim pipeline or tool
-
ExploitVictim opens file in HTSlib
-
ExecutionName decoded into 1024-byte stack buffer
-
PersistOverflow occurs before length validation
-
ImpactProcess crash or arbitrary code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires that an HTSlib-based application (e.g. samtools/bcftools or any downstream consumer) open and decode an attacker-controlled CRAM file containing a record with a query name longer than the 254-character specification limit; all CRAM format versions are affected and no special configuration or feature toggle is needed. The limiting factor is delivery and victim action: an attacker must get the target to parse a maliciously crafted CRAM file, so this is not autonomous network exploitation despite the supplied AV:N/UI:N vector. There is no workaround per the vendor - only upgrading to 1.21.2, 1.22.3, 1.23.2, or 1.24 removes the flaw. |
| Impact | This is a CWE-121 stack write overflow in HTSlib's CRAM decoder, rated CVSS 4.0 8.8 (VI:H/VA:L). Weighing all signals: there is NO CISA KEV listing, NO EPSS score supplied, and NO verified public exploit - the issue was found through fuzzing by Claude and Ada Logics and reported responsibly via GitHub advisory, so there is no public exploit identified at time of analysis. The vuln.today Decision label is 'this_week' (priority, but not act_now/emergency), consistent with a serious memory-safety bug lacking evidence of active exploitation. A key signal conflict must be stated: the supplied CVSS 4.0 vector is AV:N/PR:N/UI:N, yet the advisory text says exploitation occurs when 'a user opens a file crafted to exploit this issue' - that is effectively attacker-delivered data plus a victim action, so the UI:N / pure-network framing overstates how autonomous the attack is; realistic exploitation depends on getting a target to parse an attacker-controlled CRAM record. Net: a genuine, high-severity memory-corruption flaw in a widely-used genomics library, but real-world urgency is moderated by the absence of KEV/EPSS/PoC evidence and the requirement that a victim process a malicious file. Treat as patch-this-week, not an emergency, matching the Decision label. |
| Exploit ScenarioDerived | An attacker crafts a malicious CRAM file whose record carries a query name far exceeding the 254-character specification limit, then delivers it as a shared sequencing dataset or pipeline input. When a researcher or an automated bioinformatics pipeline opens the file with an HTSlib-based tool, the overlong name is decoded into a fixed 1024-byte stack array before the length check runs, overflowing the stack and crashing the process or corrupting stack data, potentially allowing arbitrary code execution. No public exploit code was identified; the flaw was discovered via fuzzing. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
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 crafted CRAM record whose query name exceeds the 254-character specification limit is decoded into a 1024-byte stack array before the length check runs, so an overlong name is written past that buffer. Successful exploitation crashes the process or corrupts stack data and may allow arbitrary code execution, though the vendor rates integrity impact high and availability impact low. Reaching the flaw requires that an HTSlib-based application such as samtools or bcftools, or any downstream consumer, open and decode an attacker-supplied CRAM file, so delivery depends on victim interaction; no public exploit code has been identified at time of analysis and the vendor states there is no workaround, only upgrading to a fixed release.
RemediationAI
Upgrade to the fixed release for your branch: 1.21.2, 1.22.3, 1.23.2, or 1.24 (release tags at https://github.com/samtools/htslib/releases/tag/1.21.2, /1.22.3, /1.23.2, and /1.24); the fix commits are 25278797c251a9af789382ecf5aa0c86f417bdf5, df93e245f1b517aec86c69684fcb2faf5942c5c2, and f1d1bf835aaafa1e511996dcd49760c36f683b17, merged via https://github.com/samtools/htslib/pull/2046. The vendor advisory explicitly states there is no workaround, so upgrading is the only complete fix; because the assessed precondition is that a user opens and decodes an attacker-controlled CRAM file, the only partial exposure reduction available until patched is to avoid decoding CRAM input from untrusted or unverified sources, which constrains legitimate workflow flexibility without removing the underlying defect. Applications statically linking or vendoring HTSlib, including samtools/bcftools builds, must be rebuilt against a patched HTSlib to be protected.
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 a compressed bioinformatics format for DNA sequence alignment data, implemented in HTSlib and consumed by tools such as samtools and bcftools. The CRAM specification caps the read query name at 254 characters, but in the affected code the decoded name is written into a fixed 1024-byte stack buffer, char name_a[1024], inside the slice decoding path (cram_decode_slice / cram_to_bam) and the length limitation was validated only afterwards, producing a CWE-121 stack write overflow (also classified CWE-787). Because the overflow is driven by attacker-controlled record data interpreted during normal file parsing, all CRAM format versions are affected and no special configuration or feature toggle is needed. The upstream fix adds a BAM_MAX_QNAME_LEN (254) check in cram_decode_slice before the name is copied, shrinks the temporary name buffer to BAM_MAX_QNAME_LEN + 64, rejects over-long mate names, and additionally widens size/bit-count arithmetic in the beta codec helpers (int to uint32_t/uint64_t) in cram_codecs.c and cram_not_enough_bits.
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:N/VI:H/VA:L/SC:N/SI:N/SA:N
File is attacker-delivered but a victim must open it, so UI:R; stack overflow enables memory corruption/possible code execution (I:H) and crashes (A:L), with no data disclosure (C:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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 decoder validates the 254-character query-name limit only after decoding the name into a 1024-byte stack array. An attacker-controlled CRAM record can provide an overlong query name and overflow the local stack buffer before the later validation runs; all CRAM format versions are affected. Opening such a file can crash the process, corrupt stack data, and may permit arbitrary code execution. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.
Technical POC Analysis
CWE-121 (stack-based buffer overflow), also classified CWE-787.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity stack-based buffer overflow in HTSlib's CRAM decoder affects all releases prior to the fixed versions. Any application using HTSlib to process attacker-supplied CRAM files, such as samtools or bcftools, is at risk. Successful exploitation could crash the process, corrupt data, or potentially allow arbitrary code execution, though the attacker must convince a user to open a malicious file. Given the widespread use of HTSlib in bioinformatics pipelines, leadership should prioritize remediation to prevent disruption to research workflows and protect data integrity.
No vendor-released patch identified at time of analysis; vendor states no workaround, only upgrading. Interim mitigations include restricting CRAM file processing to trusted sources and enforcing file validation.
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.
A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
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
HTSlib versions prior to 1.21.1, 1.22.2, and 1.23.1 contain an out-by-one error in the CRAM decoder's `cram_byte_array_s
EUVD-2026-130306
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB