Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-31970

published high CVSS 4.0 · 7.1

HTSlib BGZF index file reader has a heap buffer overflow

Published
18 Mar 2026, 19:53:18 UTC
Updated
18 Mar 2026, 23:08:18 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
samtools — htslib< 1.21.1 · >= 1.22, < 1.22.2 · = 1.23 Affected Not stated GitHub_M

Description

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
4.0
Base score
7.1 / 10
Severity
high
Provider
GitHub_M · cna
Vector string
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
samtools htslib < 1.21.1 (affected)>= 1.22, < 1.22.2 (affected)= 1.23 (affected) GitHub_M · cna

Weaknesses

5
  • CWE-122 CWE-122: Heap-based Buffer Overflow (GitHub_M · cna)
  • CWE-131 CWE-131: Incorrect Calculation of Buffer Size (GitHub_M · cna)
  • CWE-190 CWE-190: Integer Overflow or Wraparound (GitHub_M · cna)
  • CWE-787 CWE-787: Out-of-bounds Write (GitHub_M · cna)
  • CWE-1284 CWE-1284: Improper Validation of Specified Quantity in Input (GitHub_M · cna)

References

3

Provider assertions

3

GitHub_M · cna

HTSlib BGZF index file reader has a heap buffer overflow

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
2c03d7d5d7d81f3749f7868d76b79883cf10ed5ebecee3e1781b08b37c2cd2f4
Ingested
23 Sep 2026, 09:09:43 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected