HTSlib: Heap write overflow in HTSlib FASTA index handling
NIST has not reviewed this entry yet, so scores and affected versions may be missing or may change.
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.
Heap-based Buffer Overflow CWE-122
Too much data overwrites memory the program uses while it runs, which can let an attacker run their code.
The product writes past the end of a buffer that was allocated on the heap.
Weakness data: MITRE Common Weakness Enumeration.
Out-of-bounds Write CWE-787
The software writes data outside the space it was given. Attackers use this to run their own code or crash the program.
The product writes data past the end, or before the beginning, of the intended buffer.
Weakness data: MITRE Common Weakness Enumeration.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Samtools Htslib | Software | < 1.21.2; >= 1.22.0, < 1.22.3; >= 1.23.0, < 1.23.2 | not recorded |
The 7.1 severity score (high) from github.com, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Setup needed on the target | None | No special setup on the target is needed. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Passive | A person has to do something simple, such as view a page. |
| Data exposed | None | No data can be read. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | Low | The attacker can slow the service or interrupt it briefly. |
NIST lists 10 sources for this flaw, none tagged as a vendor patch.