CVE-2026-62255 in Htslibinfo

Summary

by MITRE • 11/20/2026

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, cram_index_load does not verify that the number of reference sequences in a CRAM .crai index does not exceed the CRAM header reference count. A malformed index can drive unbounded index-array allocation, and when the number of references in the index is within two of INT_MAX, the growth calculation can wrap, read beyond a heap buffer, and use the resulting value as a pointer for an unchecked memory write. Any region query can trigger the flaw, causing denial of service or memory corruption. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/20/2026

HTSlib serves as a foundational library for bioinformatics applications, providing essential functionality for reading and writing various genomic file formats including CRAM. The vulnerability identified in versions prior to 1.21.2, 1.22.3, 1.23.2, and 1.24 resides within the cram_index_load function, which is responsible for parsing index files associated with compressed alignment data. This component fails to perform adequate validation on the structural integrity of the CRAM index file relative to the main header information. Specifically, the library does not verify that the number of reference sequences declared in the .crai index matches or remains within acceptable bounds compared to the reference count specified in the CRAM header. This lack of cross-validation allows a maliciously crafted index file to present data that contradicts the expected structure defined by the primary sequence container.

The technical flaw manifests as an unbounded memory allocation issue driven by integer arithmetic vulnerabilities. When a malformed index specifies a number of references, the library attempts to allocate an array large enough to store metadata for each reference. If this specified count is sufficiently high and approaches two less than INT_MAX, the internal growth calculation used during dynamic array resizing can suffer from signed integer overflow. This wraparound effect results in a significantly smaller allocated buffer size than intended by the application logic. Consequently, subsequent operations that assume the larger allocation will read beyond the bounds of the actual heap-allocated memory block.

This out-of-bounds read condition is particularly dangerous because the data retrieved from this invalid memory location is subsequently used as a pointer value for an unchecked memory write operation. This sequence creates a classic scenario where arbitrary code execution or severe memory corruption can occur depending on what data resides in the adjacent memory space and how it is interpreted by the application. The vulnerability is triggered during any region query, which necessitates loading and processing the index file to locate specific genomic coordinates. Therefore, simply opening and querying a maliciously constructed CRAM index file is sufficient to exploit this flaw without requiring complex interaction patterns or elevated privileges beyond those needed to run the bioinformatics software.

The operational impact of this vulnerability includes both denial of service and potential remote code execution. In cases where memory corruption does not lead directly to code execution, it typically results in application crashes due to segmentation faults or access violations caused by writing to invalid memory addresses. For security-conscious environments processing untrusted genomic data from external sources such as public repositories or collaborative projects, this represents a significant risk vector. Attackers could distribute maliciously crafted index files designed to exploit these integer overflow and buffer over-read conditions when victims attempt to analyze the associated sequence data using vulnerable versions of HTSlib.

Mitigation strategies primarily involve upgrading to patched versions of HTSlib where 1.21.2, 1.22.3, 1.23.2, or 1.24 are available depending on the specific branch in use. These releases include fixes that enforce strict validation checks ensuring index parameters do not exceed header-defined limits and prevent integer overflow during array allocation calculations. For organizations unable to immediately upgrade, implementing input sanitization at the application layer before passing data to HTSlib functions can provide a temporary defense-in-depth measure. Additionally, deploying runtime protection mechanisms such as Address Sanitizer in development environments or memory protection extensions like DEP/NX on production systems may help mitigate exploitation attempts by detecting invalid memory accesses early.

This vulnerability aligns with Common Weakness Enumeration categories including CWE-190 Integer Overflow or Wraparound and CWE-787 Out-of-bounds Write, reflecting the core mechanisms of failure. From a tactical perspective related to MITRE ATT&CK, this flaw facilitates initial access through malicious file delivery if used in conjunction with social engineering or compromised data sources, leading potentially to privilege escalation via memory corruption techniques similar to those described under T1203 Exploitation for Client Execution. Maintaining strict validation of external inputs and keeping dependencies updated remains critical for securing bioinformatics pipelines against such low-level system vulnerabilities.

Responsible

GitHub M

Reservation

07/13/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00605

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!