HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data. As one method of removing redundant data, CRAM uses reference-based compression so that instead of storing the full sequence for each alignment record it stores a location in an external reference sequence along with a list of differences to the reference at that location as a sequence of "features". When decoding CRAM records, the reference data is stored in a char array, and parts matching the alignment record sequence are copied over as necessary. Due to insufficient validation of the feature data series, it was possible to make the cram_decode_seq() function copy data from either before the start, or after the end of the stored reference either into the buffer used to store the output sequence for the cram record, or into the buffer used to build the SAM MD tag. This allowed arbitrary data to be leaked to the calling function. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt 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.
CVE-2026-31966
This critical-severity CVE scores 9.1 under NVD CVSS v3. EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 9.1
- EG Score
- 9.1(low)
- EG Risk
- 45(Track)EG Risk 45/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity91% × 45%Exploitation0% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- —
- EPSS %ILE
- —
- KEV
- Not listed
Published
March 18, 2026
Last Modified
June 17, 2026
Advisory Details (4)
Auto-updated Jul 27, 2026Out-of-bounds read in HTSlib CRAM reader due to improper validation of input · Advisory · samtools/htslib · GitHub
https://github.com/samtools/htslib/security/advisories/GHSA-5cj8-mj52-8vp3commit 4a5ef25eb1fb (samtools/htslib)
Patch available: samtools/htslib 1.23.1 (contains commit 4a5ef25eb1fb)
https://github.com/samtools/htslib/commit/4a5ef25eb1fb3d64438103316fffe423b2c3f5f4commit 2a45eb129d70 (samtools/htslib)
Patch available: samtools/htslib 1.23.1 (contains commit 2a45eb129d70)
https://github.com/samtools/htslib/commit/2a45eb129d703ad27f9fabc8169f0e94d3c69fa3commit 22ec5230ef95 (samtools/htslib)
Patch available: samtools/htslib 1.23.1 (contains commit 22ec5230ef95)
https://github.com/samtools/htslib/commit/22ec5230ef95769ab009420da69568c7e530af28Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 2× in last 7d / 2× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-27 14:41 UTCEG score recompute
- 2026-07-27 14:27 UTCOSV refresh
Related CVEs(same CWE)
Same CWE
10 shownCWE-125 · CWE-129
Frequently asked(4)
What is CVE-2026-31966?
When was CVE-2026-31966 disclosed?
What is the CVSS score of CVE-2026-31966?
How do I remediate CVE-2026-31966?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2026-31966
Is Your Infrastructure Affected by CVE-2026-31966?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.