CVE-2026-31968

Source
https://cve.org/CVERecord?id=CVE-2026-31968
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31968.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-31968
Aliases
  • GHSA-cgcm-c9r2-p57j
Downstream
Published
2026-03-18T19:38:11.370Z
Modified
2026-04-10T05:42:53.858165Z
Severity
  • 8.8 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
HTSlib CRAM decoder vulnerable to buffer overflow
Details

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. For the VARINT and CONST encodings, incomplete validation of the context in which the encodings were used could result in up to eight bytes being written beyond the end of a heap allocation, or up to eight bytes being written to the location of a one byte variable on the stack, possibly causing the values to adjacent variables to change unexpectedly. Depending on the data stream this could result either in a heap buffer overflow or a stack overflow. If a user opens a file crafted to exploit this issue it could lead to the program crashing, overwriting of data structures on the heap or stack in ways not expected by the program, or changing the control flow of 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. There is no workaround for this issue.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31968.json",
    "cwe_ids": [
        "CWE-121",
        "CWE-122",
        "CWE-787",
        "CWE-843"
    ],
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/samtools/htslib

Affected ranges

Type
GIT
Repo
https://github.com/samtools/htslib
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Last affected
Database specific
{
    "versions": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.21.1"
        },
        {
            "last_affected": "= 1.23"
        }
    ]
}
Type
GIT
Repo
https://github.com/samtools/htslib
Events
Database specific
{
    "versions": [
        {
            "introduced": "1.22"
        },
        {
            "fixed": "1.22.2"
        }
    ]
}

Affected versions

0.*
0.2.0-rc10
0.2.0-rc11
0.2.0-rc12
0.2.0-rc2
0.2.0-rc3
0.2.0-rc4
0.2.0-rc5
0.2.0-rc6
0.2.0-rc7
0.2.0-rc8
0.2.0-rc9
1.*
1.0
1.1
1.10
1.10.1
1.10.2
1.11
1.11.0
1.12
1.13
1.14
1.15
1.15.1
1.16
1.17
1.18
1.19
1.19.1
1.2
1.2.1
1.20
1.21
1.22
1.22.1
1.23
1.3
1.3.1
1.3.2
1.4
1.4.1
1.5
1.6
1.7
1.8
1.9
Other
stable1
stable2
vcf-direct-final

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31968.json"