CVE-2026-31965

Source
https://cve.org/CVERecord?id=CVE-2026-31965
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31965.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-31965
Aliases
  • GHSA-mqm2-v645-3qhr
Downstream
Published
2026-03-18T18:50:37.333Z
Modified
2026-04-10T05:42:53.847778Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N CVSS Calculator
Summary
HTSlib CRAM reader has out-of-bounds reads due to improper validation of input
Details

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. In the cram_decode_slice() function called while reading CRAM records, validation of the reference id field occurred too late, allowing two out of bounds reads to occur before the invalid data was detected. The bug does allow two values to be leaked to the caller, however as the function reports an error it may be difficult to exploit them. It is also possible that the program will crash due to trying to access invalid memory. 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-31965.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-125",
        "CWE-129"
    ]
}
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-31965.json"