๐Ÿ” CVE Alert

CVE-2026-31962

UNKNOWN 0.0

HTSlib CRAM reader has heap buffer overflow due to improper validation of input

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. While most alignment records store DNA sequence and quality values, the format also allows them to omit this data in certain cases to save space. Due to some quirks of the CRAM format, it is necessary to handle these records carefully as they will actually store data that needs to be consumed and then discarded. Unfortunately the `cram_decode_seq()` did not handle this correctly in some cases. Where this happened it could result in reading a single byte from beyond the end of a heap allocation, followed by writing a single attacker-controlled byte to the same location. Exploiting this bug causes a heap buffer overflow. If a user opens a file crafted to exploit this issue, it could lead to the program crashing, or overwriting of data and heap structures in ways not expected by the program. It may be possible to use this to obtain arbitrary code execution. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.

CWE CWE-122 CWE-125 CWE-129 CWE-787
Vendor samtools
Product htslib
Published Mar 18, 2026
Last Updated Mar 18, 2026
Stay Ahead of the Next One

Get instant alerts for samtools htslib

Be the first to know when new unknown vulnerabilities affecting samtools htslib are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

Affected Versions

samtools / htslib
< 1.21.1 >= 1.22, < 1.22.2 = 1.23

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/samtools/htslib/security/advisories/GHSA-xxmp-v7h3-gpwp github.com: https://github.com/samtools/htslib/commit/d799b54c6401879187bba4741be83ff590ac73e3