CVE-2026-31966

Source
https://cve.org/CVERecord?id=CVE-2026-31966
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31966.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-31966
Aliases
  • GHSA-5cj8-mj52-8vp3
Downstream
Published
2026-03-18T18:58:47.090Z
Modified
2026-04-10T05:42:53.854307Z
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 read 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. As one method of removing redundant data, CRAM uses reference-based compression so that instead of storing the full sequence for each alignment record it stores a location in an external reference sequence along with a list of differences to the reference at that location as a sequence of "features". When decoding CRAM records, the reference data is stored in a char array, and parts matching the alignment record sequence are copied over as necessary. Due to insufficient validation of the feature data series, it was possible to make the cram_decode_seq() function copy data from either before the start, or after the end of the stored reference either into the buffer used to store the output sequence for the cram record, or into the buffer used to build the SAM MD tag. This allowed arbitrary data to be leaked to the calling function. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt 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
{
    "cwe_ids": [
        "CWE-125",
        "CWE-129"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31966.json",
    "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-31966.json"