
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-31963 is a heap buffer overflow vulnerability in HTSlib's CRAM file decoder, caused by an off-by-one error in the validation of CRAM feature positions relative to the record sequence boundary. An attacker can craft a malicious CRAM file that, when opened by a user, triggers an invalid write of one attacker-controlled byte beyond the end of a heap buffer. Affected versions include HTSlib ≤ 1.21, 1.22, 1.22.1, and 1.23; fixed versions are 1.21.1, 1.22.2, and 1.23.1. The vulnerability was disclosed on March 18, 2026, with a CVSS v3.1 score of 8.1 (High) and a CVSS v4.0 score of 8.8 (High) (GitHub Advisory, Red Hat Bugzilla).
The root cause is an off-by-one error (CWE-193) in the CRAM decoder within cram/cram_decode.c, specifically in the cram_decode_seq function, where the boundary check for CRAM features positioned beyond the end of the record sequence was insufficiently strict (CWE-129, CWE-122, CWE-787). The original check used pos > cr->len+1 for all feature types, but certain operations (e.g., substitutions, insertions) that write to the sequence/quality buffers must not be placed after cr->len, while non-writing operations (deletions, ref skips, padding, hard clips) may legitimately appear at cr->len+1. The fix, committed as 8bcc990, differentiates between feature types and applies the correct boundary per operation type (GitHub Commit, GitHub Advisory). Exploitation requires a user to open a specially crafted CRAM file; no authentication or elevated privileges are required beyond this user interaction.
Successful exploitation can lead to program crashes (denial of service), corruption of heap data structures, and potentially arbitrary code execution in the context of the user running the affected application. The integrity and availability of the affected system are at high risk, while confidentiality impact is assessed as none in the primary scoring. Because HTSlib is widely used in bioinformatics pipelines and tools (e.g., samtools, bcftools), exploitation could affect genomic data processing workflows and any downstream systems that depend on them (GitHub Advisory, Red Hat Bugzilla).
As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). No threat actor attribution has been reported. The EPSS score is approximately 0.076%, reflecting a low current probability of exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires user interaction (opening a malicious CRAM file), which somewhat limits automated exploitation scenarios.
cr->len + 1 — one byte beyond the end of the stored sequence — exploiting the off-by-one boundary check in the vulnerable cram_decode_seq function.samtools view, bcftools, or a custom pipeline tool). HTSlib's CRAM decoder processes the malicious feature record.samtools, bcftools) when processing CRAM files, particularly with error messages referencing feature position validation in CRAM decoding.Feature position X after end of read or abnormal termination signals (SIGSEGV, SIGABRT) from bioinformatics tools processing CRAM files.Users should upgrade HTSlib to the patched versions: 1.21.1 (for 1.21.x branch), 1.22.2 (for 1.22.x branch), or 1.23.1 (for 1.23.x branch). There is no workaround available for this vulnerability — patching is the only remediation. As an interim measure, organizations should restrict processing of CRAM files from untrusted sources and monitor for unexpected crashes in HTSlib-linked tools until patches are applied (GitHub Advisory, Red Hat Bugzilla).
The vulnerability was disclosed by HTSlib maintainer daviesrob via a GitHub Security Advisory on March 18, 2026, with an accompanying fix commit. Red Hat tracked the issue via Bugzilla and the OSS security mailing list (oss-sec) also carried a disclosure notice. Coverage appeared on Linux community sites noting security updates for related packages (bcftools, samtools) in Fedora (GitHub Advisory, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."