# CVE-2026-62257: HTSlib: Heap read and write overflow in HTSlib CRAM 4.0 decoder

Status: published. Published: 2026-11-19. Updated: 2026-11-24.

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.

## Remediation

- fix: HTSlib: GitHub reports patched versions 1.24, 1.23.2, 1.22.3 and 1.21.2. Check the advisory for the affected release branch. (source: GitHub GHSA-6q7c-m967-9v37) — https://github.com/samtools/htslib/security/advisories/GHSA-6q7c-m967-9v37

## Affected products and versions

- samtools / htslib: < 1.21.2 (affected); >= 1.22.0, < 1.22.3 (affected); >= 1.23.0, < 1.23.2 (affected). Source: CNA: GitHub_M
-  / HTSlib (HTSlib): <= 1.23.1, 1.22.2 and 1.21.1 (affected, GitHub advisory range). Source: GitHub GHSA-6q7c-m967-9v37

## Severity and prioritization

- CVSS 4.0: 8.8 (high); 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; source: CNA: GitHub_M

- CVSS 4.0: 8.8 (high); 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/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; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 0.77% as of 2026-11-23; percentile 56.59%

- SSVC: exploitation none; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-122, CWE-125, CWE-787

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/samtools/htslib/security/advisories/GHSA-6q7c-m967-9v37 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/samtools/htslib/pull/2020 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/pull/2046 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/commit/a3e8dca14dcfdc6167281721ede6d6ecd3395bad (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/commit/c0b50372ed133c650fa0a641607da5cde46bcd8c (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/commit/d66a77dbf8f52f7f44efd7929a28b94bbfc17f2f (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/releases/tag/1.21.2 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/releases/tag/1.22.3 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/releases/tag/1.23.2 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/releases/tag/1.24 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/samtools/htslib/commit/a3e8dca14dcfdc6167281721ede6d6ecd3395bad (security-advisories@github.com)

- https://github.com/samtools/htslib/commit/c0b50372ed133c650fa0a641607da5cde46bcd8c (security-advisories@github.com)

- https://github.com/samtools/htslib/commit/d66a77dbf8f52f7f44efd7929a28b94bbfc17f2f (security-advisories@github.com)

- https://github.com/samtools/htslib/pull/2020 (security-advisories@github.com)

- https://github.com/samtools/htslib/pull/2046 (security-advisories@github.com)

- https://github.com/samtools/htslib/releases/tag/1.21.2 (security-advisories@github.com)

- https://github.com/samtools/htslib/releases/tag/1.22.3 (security-advisories@github.com)

- https://github.com/samtools/htslib/releases/tag/1.23.2 (security-advisories@github.com)

- https://github.com/samtools/htslib/releases/tag/1.24 (security-advisories@github.com)

- https://github.com/samtools/htslib/security/advisories/GHSA-6q7c-m967-9v37 (security-advisories@github.com)

- https://github.com/samtools/htslib/security/advisories/GHSA-6q7c-m967-9v37 (GitHub Security Advisories; advisory)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-62257; retrieved 2026-11-24; source updated 2026-11-24

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-62257; retrieved 2026-11-24; source updated 2026-11-24

- GitHub Security Advisories: https://github.com/samtools/htslib/security/advisories/GHSA-6q7c-m967-9v37; retrieved 2026-11-21; source updated 2026-07-13

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-62257; retrieved 2026-11-24; source updated Not reported

Revision: 9c4cdb82f213d0d82cdc4267d7a8608d60333910440aea001d7ea125cc8edd19

Canonical: https://y2.dev/cve/CVE-2026-62257

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.