HTSlib heap write overflow in FASTA index retrieval
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- 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
Prior to 1.21.2, 1.22.3, 1.23.2, and 1.24, fai_retrieve in HTSlib does not verify that the line width recorded in a FASTA .fai index is greater than or equal to the number of bases per line. When the line width is exactly one less than the base count, retrieval allocates an undersized heap buffer and writes one byte past its end (CWE-122, CWE-787), while larger discrepancies cause an allocation failure that is handled. The heap corruption can crash the process. CVSS 4.0 base score is 7.1 (HIGH).
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, fai_retrieve does not verify that the line width recorded in a FASTA .fai index is greater than or equal to the number of bases per line. When the line width is exactly one less than the base count, retrieval allocates an undersized heap buffer and writes one byte beyond its end; larger discrepancies instead cause an allocation failure that is handled. This issue can corrupt heap memory and crash the process. 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
- No
- Technical impact
- Total
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 1.21.2, 1.22.3, 1.23.2, or 1.24, matching the release branch in use. Affected ranges are before 1.21.2, 1.22.0 before 1.22.3, and 1.23.0 before 1.23.2.
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-62256
- 2026-11-20 Affected versions changed · Red Hat
- 2026-11-20 CVSS score added · Red Hat
- 2026-11-24 CISA SSVC decision points changed
References
Other 10
- https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8v
- https://github.com/samtools/htslib/pull/2008
- https://github.com/samtools/htslib/commit/4af640f9ffd7f1fac95a739df7f560e3e5557960
- https://github.com/samtools/htslib/commit/504fb841b70afb948f58089c3a4337ce875c1e52
- https://github.com/samtools/htslib/commit/567fd43c6ef938de53c98217f99336e3ce5a60ab
- https://github.com/samtools/htslib/commit/cdf22929aad8dde719c1b2070ad565ac9dd76c02
- 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-94908 Heap buffer overflow in HTSlib BCF reader from crafted files 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
Sources
- CVE-2026-62256 · CVE Program
- CVE-2026-62256 · NVD
- FIRST EPSS
- CVE-2026-62256 · 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