Every CVE Search/ Get API key

CVE-2026-31965

HTSlib CRAM reader has out-of-bounds reads due to improper validation of input

6.9 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
None
Availability
Low

Exploit likelihood

0.40%Up 0.4 points since Mar 19, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.9

HTSlib CRAM reader has out-of-bounds reads due to improper validation of input

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.

Record
CVE-2026-31965
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-125, CWE-129
Updated
2026-11-02
EUVDEUVD-2026-12934 6.9

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.

Record
EUVD-2026-12934
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Updated
2026-11-02
NVD 6.9

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.

Record
CVE-2026-31965
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Weakness
CWE-125, CWE-129
Updated
2026-11-02
OSV 6.9

HTSlib CRAM reader has out-of-bounds reads due to improper validation of input

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.

Record
CVE-2026-31965
CVSS 4.0
6.9 MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Weakness
CWE-125, CWE-129
Updated
2026-11-02
OSVDEBIAN-CVE-2026-31965 8.2

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.

Record
DEBIAN-CVE-2026-31965
CVSS 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2026-31965 6.9

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.

Record
UBUNTU-CVE-2026-31965
CVSS 4.0
6.9 MediumCVSS: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 3.1
8.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
htslib
Debian:12
All versions, plus listed versions
1.16+ds-31.17+ds-0+exp11.17+ds-11.18+ds-0+exp11.18+ds-1
Show 15 moreShow less
1.19+ds-0+exp01.19+ds-11.19+ds-1+exp11.19+ds-1.11.20+ds-11.20+ds-21.21+ds-0+exp11.21+ds-0+exp21.21+ds-11.22.1+ds-11.22.1+ds-21.22.1+ds2-11.24-11.24-21.24-3
None known
htslib
Debian:13
All versions, plus listed versions
1.21+ds-11.22.1+ds-11.22.1+ds-21.22.1+ds2-11.24-11.24-21.24-3
None known
htslib
Debian:14
before 1.24-2, plus listed versions
1.21+ds-11.22.1+ds-11.22.1+ds-21.22.1+ds2-11.24-1
1.24-2
htslib
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
0.2.0~rc3-10.2.0~rc3-1ubuntu0.1~esm1
None known
htslib
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.2.1-11.2.1-21.2.1-2ubuntu11.2.1-2ubuntu1+esm1
None known
htslib
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.5-11.5-4ubuntu11.6-3ubuntu11.6-41.6-4build11.7-21.7-2ubuntu0.1~esm1
None known
htslib
Ubuntu:20.04:LTS
All versions, plus listed versions
1.9-101.9-111.9-121.10.2-2ubuntu11.10.2-2ubuntu21.10.2-31.10.2-3ubuntu0.1
None known
htslib
Ubuntu:22.04:LTS
All versions, plus listed versions
1.13+ds-21.13+ds-2build1
None known
htslib
Ubuntu:24.04:LTS
All versions, plus listed versions
1.17+ds-11.18+ds-11.19+ds-1.1build21.19+ds-1.1build3
None known
htslib
Ubuntu:25.10
All versions, plus listed versions
1.21+ds-1
None known
htslib
Ubuntu:26.10
All versions, plus listed versions
1.22.1+ds2-11.22.1+ds2-1build1
None known
htslib
Ubuntu:26.04:LTS
All versions, plus listed versions
1.21+ds-11.22.1+ds2-1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-31965 is a medium vulnerability (CVSS 6.9) in Htslib, published March 18, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.40%, the 34th percentile. Fixed in htslib 1.24-2.

References

MoveEnter Open