HTSlib: Heap write overflow in HTSlib FASTA index handling
CVE-2026-62256Published 19 Nov 2026, 15:52 UTC
Real-world risk
4.2/ 10Medium
Schedule in the normal cycle
PreliminaryFrom the CVSS vector only · confidence low
CVSS
7.1
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| htslibNiche | < 1.21.2; >= 1.22.0, < 1.22.3; >= 1.23.0, < 1.23.2 | 1.21.2, 1.22.3, 1.23.2 |
What to do
Update to a fixed version: 1.21.2, 1.22.3, 1.23.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data tamperingWrites or changes important data without gaining execution | From the CVSS vector | 0.70 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.5% chance of exploitation in 30 days (percentile 45), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 0.7 × prerequisites 0.7 × threat 0.854.165
- Rounded to one decimal between 0.1 and 104.2
Exploitation and evidence timeline
- 19 Nov 2026 Published
- 3 Dec 2026 Risk 4.2 (cvss fallback)
Weakness
CWE-122, CWE-787
References
- https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8vvendor-advisory
- https://github.com/samtools/htslib/pull/2008misc
- https://github.com/samtools/htslib/commit/4af640f9ffd7f1fac95a739df7f560e3e5557960misc
- https://github.com/samtools/htslib/commit/504fb841b70afb948f58089c3a4337ce875c1e52misc
- https://github.com/samtools/htslib/commit/567fd43c6ef938de53c98217f99336e3ce5a60abmisc
- https://github.com/samtools/htslib/commit/cdf22929aad8dde719c1b2070ad565ac9dd76c02misc
- https://github.com/samtools/htslib/releases/tag/1.21.2misc
- https://github.com/samtools/htslib/releases/tag/1.22.3misc
- https://github.com/samtools/htslib/releases/tag/1.23.2misc
- https://github.com/samtools/htslib/releases/tag/1.24misc
- CVE-2026-62256 on CVE.org