Read the docs

Heap out-of-bounds read and write in HTSlib CRAM v4 decoder

Priority MEDIUM 42CWE-122Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
—
Confidentiality · integrity · availability
None · High · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA.

Summary

HTSlib versions before 1.21.2, from 1.22.0 before 1.22.3, and from 1.23.0 before 1.23.2 are affected. The experimental CRAM v4 XPACK and XRLE decoders cache block pointers beyond the bounds of a fixed array, using an index partly controlled by the input file, which causes a heap out-of-bounds read and write (CWE-122). An unauthenticated attacker who supplies a crafted CRAM file can crash the process or corrupt heap memory, which could permit arbitrary code execution.

Written with Claude Haiku 5.5 from the sources below · 2026-11-20

Description from the CNA

HTSlib is a library for reading and writing bioinformatics file formats. Prior to 1.21.2, 1.22.3, 1.23.2, and 1.24, the experimental CRAM v4 XPACK and XRLE decoders cache expanded block pointers at indexes beyond the 512-element slice->block_by_id array. An array index partially controlled by data in the input file first causes an out-of-bounds read to determine whether a block is cached; a null value then causes allocation of a block and an out-of-bounds pointer write to the same element. The invalid read may crash the process, while the write may corrupt heap state and could permit arbitrary code execution. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0086 56th percentileScored 2026-11-30
Fix Fixed htslib (samtools): 1.21.2, 1.22.3, 1.23.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
samtoolshtslibbefore 1.21.2; 1.22.0 to before 1.22.3; 1.23.0 to before 1.23.21.21.2, 1.22.3, 1.23.2Patch availableCNA
  • htslib Vendorsamtools Affected before 1.21.2; 1.22.0 to before 1.22.3; 1.23.0 to before 1.23.2 Fixed in 1.21.2, 1.22.3, 1.23.2 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:*——Htslib
  • cpe:2.3:a:htslib:htslib:*:*:*:*:*:*:*:* Versions — — ·Htslib

Remediation

The fix is in HTSlib 1.21.2, 1.22.3, and 1.23.2. Upgrade to the fixed release on the branch in use.

Written with Claude Haiku 5.5 from the sources below · 2026-11-20

  • Fix · CNA htslib (samtools) Fixed in 1.21.2, 1.22.3, 1.23.2

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-11-19 Threatist record created from CVE-2026-62257
  2. 2026-11-20 Affected versions changed · Red Hat
  3. 2026-11-20 CVSS score added · Red Hat
  4. 2026-11-24 CISA SSVC decision points changed

References

  • TI-2022-05532 Creation of Temporary File in Directory with Insecure Permissions CVSS 3.1HIGH 7.8
  • TI-2026-94926 Heap overflow in HTSlib CRAM index loading enables memory corruption CVSS 4.0HIGH 7.1
  • TI-2026-94928 HTSlib CRAM decoder stack write overflow via overlong query name CVSS 4.0HIGH 8.8
  • TI-2026-94908 Heap buffer overflow in HTSlib BCF reader from crafted files CVSS 4.0HIGH 8.8
  • TI-2026-24512 HTSlib CRAM decoder vulnerable to buffer overflow CVSS 4.0HIGH 8.8
  • TI-2026-24507 HTSlib CRAM reader has heap buffer overflow due to improper validation of input CVSS 4.0HIGH 8.8
See all 20 →

Sources