Heap buffer overflow in HTSlib BCF reader from crafted files
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
The samtools HTSlib library is affected before 1.21.2, from 1.22.0 before 1.22.3, and from 1.23.0 before 1.23.2. An integer overflow in the BCF record-length check lets a crafted record bypass the check and read and write past the heap buffer (CWE-122). An unauthenticated remote attacker can exploit this with a crafted BCF file that the reader opens. Opening such a file can crash the process, corrupt data, and may permit arbitrary code execution.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
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 BCF reader can experience an integer overflow in a record-length check that verifies whether a record contains enough bytes for the expected number and size of stored items. A crafted BCF record can bypass this check, causing reads beyond the stored data and, in some cases, writes beyond the heap buffer when the reader sets the least significant bit of accessed bytes. Opening such a file can crash the process, corrupt data or heap structures, and may permit arbitrary code execution. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| samtools | htslib | before 1.21.2; 1.22.0 to before 1.22.3; 1.23.0 to before 1.23.2 | 1.21.2, 1.22.3, 1.23.2 | Patch available | CNA |
- htslib Vendorsamtools Affected before 1.21.2; 1.22.0 to before 1.22.3; 1.23.0 to before 1.23.2 Fixed in 1.21.2, 1.22.3, 1.23.2 Patch available CNA
Remediation
Upgrade HTSlib to version 1.21.2, 1.22.3 or 1.23.2, the fixed version on the matching release line.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA htslib (samtools) Fixed in 1.21.2, 1.22.3, 1.23.2
Vendor assessments
Timeline
- 2026-11-19 Threatist record created from CVE-2026-63390
- 2026-11-19 CISA SSVC decision points changed
- 2026-11-20 Affected versions changed · Red Hat
- 2026-11-20 CVSS score added · Red Hat
References
Other 9
- https://github.com/samtools/htslib/security/advisories/GHSA-2wm6-8hgm-7g92
- https://github.com/samtools/htslib/pull/2047
- https://github.com/samtools/htslib/commit/00a30cdb8db1f5832eb58a799383a462c6b58cb3
- https://github.com/samtools/htslib/commit/2713f39242f4afff5382aad5c1ba02abe12950cd
- https://github.com/samtools/htslib/commit/3a3585dc844f7caad266bbec8d91e45c09c1dcd4
- https://github.com/samtools/htslib/releases/tag/1.21.2
- https://github.com/samtools/htslib/releases/tag/1.22.3
- https://github.com/samtools/htslib/releases/tag/1.23.2
- https://github.com/samtools/htslib/releases/tag/1.24
More samtools vulnerabilities
- TI-2022-05532 Creation of Temporary File in Directory with Insecure Permissions CVSS 3.1HIGH 7.8
- TI-2026-94926 Heap overflow in HTSlib CRAM index loading enables memory corruption CVSS 4.0HIGH 7.1
- TI-2026-94928 HTSlib CRAM decoder stack write overflow via overlong query name CVSS 4.0HIGH 8.8
- TI-2026-24512 HTSlib CRAM decoder vulnerable to buffer overflow CVSS 4.0HIGH 8.8
- TI-2026-24507 HTSlib CRAM reader has heap buffer overflow due to improper validation of input CVSS 4.0HIGH 8.8
- TI-2026-24506 HTSlib CRAM reader has heap buffer overflow due to improper validation of input CVSS 4.0HIGH 8.8
Sources
- CVE-2026-63390 · CVE Program
- CVE-2026-63390 · NVD
- FIRST EPSS
- CVE-2026-63390 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences