# CVE-2026-62256: HTSlib: Heap write overflow in HTSlib FASTA index handling

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, fai_retrieve does not verify that the line width recorded in a FASTA .fai index is greater than or equal to the number of bases per line. When the line width is exactly one less than the base count, retrieval allocates an undersized heap buffer and writes one byte beyond its end; larger discrepancies instead cause an allocation failure that is handled. This issue can corrupt heap memory and crash the process. 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-4hjq-r829-8c8v) — https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8v

## 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-4hjq-r829-8c8v

## Severity and prioritization

- CVSS 4.0: 7.1 (high); CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N; source: CNA: GitHub_M

- CVSS 4.0: 7.1 (high); CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/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.40% as of 2026-11-23; percentile 35.46%

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

- Weaknesses: CWE-122, 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-4hjq-r829-8c8v (CNA: GitHub_M; x_refsource_CONFIRM)

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

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

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

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

- https://github.com/samtools/htslib/commit/cdf22929aad8dde719c1b2070ad565ac9dd76c02 (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/4af640f9ffd7f1fac95a739df7f560e3e5557960 (security-advisories@github.com)

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

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

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

- https://github.com/samtools/htslib/pull/2008 (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-4hjq-r829-8c8v (security-advisories@github.com)

- https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8v (GitHub Security Advisories; advisory)

## Provenance

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

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

- GitHub Security Advisories: https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8v; retrieved 2026-11-24; source updated 2026-07-13

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

Revision: f8bb4baa47b22ec2919505fd7502bc542e115b1f4b44292ce83404d598907ca5

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

## 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.