CyberIntel ⬡ News
★ Saved ◆ Cyber Reads
← Back ⬡ Vulnerabilities & CVEs Mar 19, 2026

CVE-2026-31970 | samtools htslib up to 1.21.0/1.22.1/1.23 GZI File Parser bgzf_index_load_hfile heap-based overflow (GHSA-p345-84hx-fq6q)

VulDB Archived Mar 19, 2026 ✓ Full text saved

A vulnerability was found in samtools htslib up to 1.21.0/1.22.1/1.23 and classified as critical . Affected is the function bgzf_index_load_hfile of the component GZI File Parser . Such manipulation leads to heap-based buffer overflow. This vulnerability is traded as CVE-2026-31970 . The attack may be launched remotely. There is no exploit available. It is suggested to upgrade the affected component.

Full text archived locally
✦ AI Summary · Claude Sonnet


    VDB-351615 · CVE-2026-31970 · GHSA-P345-84HX-FQ6Q SAMTOOLS HTSLIB UP TO 1.21.0/1.22.1/1.23 GZI FILE PARSER BGZF_INDEX_LOAD_HFILE HEAP-BASED OVERFLOW HISTORYDIFFRELATEJSONXMLCTI CVSS Meta Temp Score Current Exploit Price (≈) CTI Interest Score 6.0 $0-$5k 0.46+ Summaryinfo A vulnerability was found in samtools htslib up to 1.21.0/1.22.1/1.23. It has been classified as critical. Affected by this vulnerability is the function bgzf_index_load_hfile of the component GZI File Parser. Performing a manipulation results in heap-based overflow. This vulnerability is known as CVE-2026-31970. Remote exploitation of the attack is possible. No exploit is available. Upgrading the affected component is recommended. Detailsinfo A vulnerability, which was classified as critical, was found in samtools htslib up to 1.21.0/1.22.1/1.23. This affects the function bgzf_index_load_hfile of the component GZI File Parser. The manipulation with an unknown input leads to a heap-based overflow vulnerability. CWE is classifying the issue as CWE-122. A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is: HTSlib is a library for reading and writing bioinformatics file formats. GZI files are used to index block-compressed GZIP [BGZF] files. In the GZI loading function, `bgzf_index_load_hfile()`, it was possible to trigger an integer overflow, leading to an under- or zero-sized buffer being allocated to store the index. Sixteen zero bytes would then be written to this buffer, and, depending on the result of the overflow the rest of the file may also be loaded into the buffer as well. If the function did attempt to load the data, it would eventually fail due to not reading the expected number of records, and then try to free the overflowed heap buffer. 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. The easiest work-around is to discard any `.gzi` index files from untrusted sources, and use the `bgzip -r` option to recreate them. It is possible to read the advisory at github.com. This vulnerability is uniquely identified as CVE-2026-31970 since 03/10/2026. The exploitability is told to be easy. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. It demands that the victim is doing some kind of user interaction. Technical details of the vulnerability are known, but there is no available exploit. Upgrading to version 1.21.1 or 1.22.2 eliminates this vulnerability. Applying the patch 6dd0d7d0e9e7e2e173a28969e624db8bc8bb5828 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version. Productinfo Vendor samtools Name htslib Version 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.21.0 1.22 1.22.0 1.22.1 1.23 License open-source Website Product: https://github.com/samtools/htslib/ CPE 2.3info 🔒 🔒 🔒 CPE 2.2info 🔒 🔒 🔒 CVSSv4info VulDB Vector: 🔒 VulDB Reliability: 🔍 CNA CVSS-B Score: 🔒 CNA CVSS-BT Score: 🔒 CNA Vector: 🔒 CVSSv3info VulDB Meta Base Score: 6.3 VulDB Meta Temp Score: 6.0 VulDB Base Score: 6.3 VulDB Temp Score: 6.0 VulDB Vector: 🔒 VulDB Reliability: 🔍 CVSSv2info Vector Complexity Authentication Confidentiality Integrity Availability Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock Unlock VulDB Base Score: 🔒 VulDB Temp Score: 🔒 VulDB Reliability: 🔍 Exploitinginfo Class: Heap-based overflow CWE: CWE-122 / CWE-119 CAPEC: 🔒 ATT&CK: 🔒 Physical: No Local: No Remote: Yes Availability: 🔒 Status: Not defined Price Prediction: 🔍 Current Price Estimation: 🔒 0-Day Unlock Unlock Unlock Unlock Today Unlock Unlock Unlock Unlock Threat Intelligenceinfo Interest: 🔍 Active Actors: 🔍 Active APT Groups: 🔍 Countermeasuresinfo Recommended: Upgrade Status: 🔍 0-Day Time: 🔒 Upgrade: htslib 1.21.1/1.22.2 Patch: 6dd0d7d0e9e7e2e173a28969e624db8bc8bb5828 Timelineinfo 03/10/2026 CVE reserved 03/18/2026 +8 days Advisory disclosed 03/18/2026 +0 days VulDB entry created 03/18/2026 +0 days VulDB entry last update Sourcesinfo Product: github.com Advisory: GHSA-p345-84hx-fq6q Status: Confirmed CVE: CVE-2026-31970 (🔒) GCVE (CVE): GCVE-0-2026-31970 GCVE (VulDB): GCVE-100-351615 Entryinfo Created: 03/18/2026 23:48 Changes: 03/18/2026 23:48 (71) Complete: 🔍 Cache ID: 99:5C3:101 Discussion No comments yet. Languages: en. Please log in to comment. ◂ PreviousOverviewNext ▸
    💬 Team Notes
    Article Info
    Source
    VulDB
    Category
    ⬡ Vulnerabilities & CVEs
    Published
    Mar 19, 2026
    Archived
    Mar 19, 2026
    Full Text
    ✓ Saved locally
    Open Original ↗