Stack-based Buffer Overflow Affecting htslib package, versions <1.24-2


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.82% (59th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-HTSLIB-22719004
  • published22 Nov 2026
  • disclosed19 Nov 2026

Introduced: 19 Nov 2026

NewCVE-2026-62258  (opens in a new tab)
CWE-121  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade Debian:unstable htslib to version 1.24-2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream htslib package and not the htslib package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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 CRAM decoder validates the 254-character query-name limit only after decoding the name into a 1024-byte stack array. An attacker-controlled CRAM record can provide an overlong query name and overflow the local stack buffer before the later validation runs; all CRAM format versions are affected. Opening such a file can crash the process, corrupt stack data, and may permit arbitrary code execution. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.