Skip to main content

Htslib CVE-2026-31964

| EUVDEUVD-2026-12932 MEDIUM
NULL Pointer Dereference (CWE-476)
2026-03-18 GitHub_M
6.9
CVSS 4.0 · GitHub Advisory
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

While a formal CVSS score is not provided, the vulnerability characteristics indicate moderate real-world risk with high exploitability but limited scope impact. The attack vector is local/network (file-based input), requires no authentication, and has low attack complexity—any application processing untrusted CRAM files is vulnerable. The technical impact is denial of service only; there is no indication of code execution, data disclosure, or privilege escalation potential. The vulnerability is not listed as actively exploited in known exploitation databases (KEV status unknown from provided data), and no public proof-of-concept has been disclosed, reducing immediate urgency. However, the ease of exploitation (crafted CRAM file triggers crash), widespread use of HTSlib in genomics research pipelines, and potential for supply-chain impact through bioinformatics workflows elevate concern. Organizations running HTSlib-dependent services without input validation should treat this as a moderate priority patch requiring prompt version updates to 1.21.1, 1.22.2, or 1.23.1 within 30 days.

Exploit ScenarioDerived

A researcher or automated pipeline receives a malicious CRAM file from an untrusted genomics data repository or collaborator. When the pipeline processes this file using vulnerable HTSlib (versions before 1.21.1/1.22.2/1.23.1), the decoder encounters a record with omitted sequence data encoded using CONST, XPACK, or XRLE. The vulnerable encoding handler attempts to write decoded data to a NULL pointer instead of discarding it, triggering a segmentation fault that crashes the pipeline application. An attacker could weaponize this to disrupt genomics research workflows, corrupt analysis jobs in batch processing systems, or cause denial of service in shared research compute clusters—particularly impactful in high-throughput sequencing environments where HTSlib is foundational infrastructure.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 18, 2026

HTSlib, a bioinformatics library for reading and writing sequence alignment formats, contains a null pointer dereference vulnerability in its CRAM format decoder affecting versions before 1.23.1, 1.22.2, and 1.21.1. The vulnerability exists in the CONST, XPACK, and XRLE encodings which fail to properly handle CRAM records with omitted sequence or quality data, causing attempts to write to NULL pointers when these records are decoded. An attacker can exploit this by providing a malformed CRAM file to any application using vulnerable HTSlib versions, resulting in denial of service through application crash, with no known active exploitation or public proof-of-concept at this time.

RemediationAI

Upgrade HTSlib to version 1.21.1, 1.22.2, or 1.23.1 or later depending on your current release line. The patch is available via the official HTSlib repository (https://github.com/samtools/htslib/commit/e64e68da567d2309509d059ace016d5d7fc7514f). After upgrading HTSlib, rebuild any dependent applications (SAMtools, BCFtools, custom bioinformatics pipelines) that statically link or dynamically depend on the library. For organizations unable to immediately patch, implement input validation by rejecting or sandboxing processing of CRAM files with omitted sequence/quality records, and restrict HTSlib-based services to trusted data sources only. Enable crash logging and alerting on HTSlib-based processes to detect exploitation attempts. No functional workaround exists within HTSlib itself, so patching is mandatory.

Affected VersionsENISA

htslib 1.22, < 1.22.2
htslib = 1.23
htslib < 1.21.1

Affected Packages

euvd htslib fix: 1.21.1, 1.22.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HTSlib is a C library used across bioinformatics pipelines to parse and manipulate sequence alignment formats including SAM, BAM, and CRAM. The CRAM format is a highly compressed alternative to BAM that uses various encoding schemes including CONST, XPACK, and XRLE to store DNA sequence and quality data. The CRAM specification allows certain alignment records to omit sequence and quality information to conserve space; these records still contain encoded data that must be consumed and discarded by the decoder. The root cause (CWE-476: NULL Pointer Dereference) occurs because the three vulnerable encodings did not properly implement the interface contract required to handle these omitted-data records, attempting to dereference NULL pointers during the discard operation. This affects HTSlib versions across the 1.21.x, 1.22.x, and 1.23.x release lines as identified by CPE cpe:2.3:a:samtools:htslib:*:*:*:*:*:*:*:*.

Know when Htslib gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Red Hat 5.0 MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 18, 2026 - 18:27 nvd
MEDIUM 6.9

DescriptionGitHub Advisory

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. While most alignment records store DNA sequence and quality values, the format also allows them to omit this data in certain cases to save space. Due to some quirks of the CRAM format, it is necessary to handle these records carefully as they will actually store data that needs to be consumed and then discarded. Unfortunately the CONST, XPACK and XRLE encodings did not properly implement the interface needed to do this. Trying to decode records with omitted sequence or quality data using these encodings would result in an attempt to write to a NULL pointer. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.

Executive ViewAI

Why It Matters

Organizations using HTSlib should be aware of notable risk from CVE-2026-31964, a null pointer dereference vulnerability rated CVSS 6.9. Exploitation could compromise the security of affected deployments. Organizations should apply vendor updates when available and monitor for exploitation.

Business Impact: Moderate
Compensating Controls

Apply vendor patch. If patching is delayed: enable ASLR/DEP, apply network segmentation.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Related Vulnerabilities in HTSlib CRAM Format Buffer Overflow

View all 3

More in Htslib

View all
CVE-2018-13843 HIGH POC
7.5 Jul 10

An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au

CVE-2017-1000206 CRITICAL
9.8 Nov 17

samtools htslib library version 1.4.0 and earlier is vulnerable to buffer overflow in the CRAM rANS codec resulting in p

CVE-2018-13845 CRITICAL
9.8 Jul 10

An issue has been found in HTSlib 1.8. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable, n

CVE-2026-31968 HIGH
8.8 Mar 18

HTSlib contains a buffer overflow vulnerability in its CRAM format decoder affecting the VARINT and CONST encoding handl

CVE-2026-62258 HIGH
8.8 Nov 19

Stack-based buffer overflow in HTSlib's CRAM decoder affects all releases before 1.21.2, 1.22.3, 1.23.2, and 1.24: a cra

CVE-2026-62257 HIGH
8.8 Nov 19

Heap out-of-bounds read and write in HTSlib's experimental CRAM v4 XPACK and XRLE decoders allows a remote, unauthentica

CVE-2026-63390 HIGH
8.8 Nov 19

Heap buffer overflow in HTSlib's BCF reader allows an attacker-crafted BCF file to corrupt heap memory when opened by an

CVE-2018-14329 MEDIUM POC
4.7 Jul 17

In HTSlib 1.8, a race condition in cram/cram_io.c might allow local users to overwrite arbitrary files via a symlink att

CVE-2018-13844 HIGH
7.5 Jul 10

An issue has been found in HTSlib 1.8. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au

CVE-2026-31971 HIGH
7.1 Mar 18

HTSlib, a widely-used bioinformatics library for reading and writing sequence alignment formats, contains a critical buf

Vendor StatusVendor

Debian

htslib
Release Status Fixed Version Urgency
bullseye vulnerable 1.11-4 -
bookworm vulnerable 1.16+ds-3 -
trixie vulnerable 1.21+ds-1 -
forky, sid vulnerable 1.22.1+ds2-1 -
(unstable) fixed (unfixed) -

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy