CVE-2026-31964: CWE-476: NULL Pointer Dereference in samtools htslib
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.
AI Analysis
Technical Summary
CVE-2026-31964 is a vulnerability in the htslib library, a core component of samtools widely used for reading and writing bioinformatics file formats, including CRAM, which compresses DNA sequence alignment data. The CRAM format allows omission of sequence and quality data in certain records to save space, but these records must still be processed carefully. The vulnerability arises because the CONST, XPACK, and XRLE encodings in htslib did not correctly implement the interface to handle these omitted data records, leading to attempts to write to a NULL pointer during decoding. This NULL pointer dereference results in a program crash, causing a denial-of-service condition. The issue affects htslib versions before 1.21.1, versions from 1.22 up to but not including 1.22.2, and version 1.23.1. The vulnerability requires no authentication or user interaction and can be triggered remotely by processing crafted CRAM files. There are no known exploits in the wild, and no workaround exists other than applying the fixed versions. The CVSS 4.0 base score of 6.9 reflects the medium severity, with network attack vector, low complexity, no privileges required, and no user interaction needed. The impact is limited to availability due to crashes, with no direct confidentiality or integrity compromise. This vulnerability is particularly relevant to organizations processing genomic data using samtools and htslib, including research labs, healthcare institutions, and biotech firms.
Potential Impact
The primary impact of CVE-2026-31964 is denial of service caused by application crashes when processing specially crafted CRAM files with omitted sequence or quality data using vulnerable htslib versions. This can disrupt bioinformatics workflows, delay genomic data analysis, and potentially halt critical research or clinical diagnostics relying on samtools. While the vulnerability does not directly expose sensitive data or allow code execution, the availability impact can be significant in environments where continuous processing of large genomic datasets is essential. Organizations relying on automated pipelines for DNA sequence alignment and analysis may experience interruptions, leading to operational delays and increased costs. Additionally, if exploited in a targeted manner, attackers could disrupt services in research or healthcare settings, impacting patient care or scientific progress. The lack of authentication or user interaction requirements increases the risk of remote exploitation by submitting malicious CRAM files to vulnerable systems.
Mitigation Recommendations
The only effective mitigation is to upgrade htslib to version 1.21.1, 1.22.2, 1.23.1, or later, where the NULL pointer dereference issue has been fixed. Organizations should audit their environments to identify all instances of samtools and htslib and verify the versions in use. Automated deployment tools can facilitate rapid patching across research clusters and production systems. Since no workaround exists, blocking or filtering CRAM files from untrusted sources may reduce exposure but is not a substitute for patching. Implementing input validation and sandboxing bioinformatics processing pipelines can limit the impact of crashes. Monitoring for abnormal application crashes or denial-of-service symptoms during CRAM file processing can help detect exploitation attempts. Finally, maintaining an inventory of bioinformatics tools and dependencies and integrating vulnerability management into research IT operations will improve resilience against similar issues.
Affected Countries
United States, United Kingdom, Germany, France, Japan, China, Canada, Australia, South Korea, Netherlands, Switzerland, Sweden
CVE-2026-31964: CWE-476: NULL Pointer Dereference in samtools htslib
Description
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.
AI-Powered Analysis
Technical Analysis
CVE-2026-31964 is a vulnerability in the htslib library, a core component of samtools widely used for reading and writing bioinformatics file formats, including CRAM, which compresses DNA sequence alignment data. The CRAM format allows omission of sequence and quality data in certain records to save space, but these records must still be processed carefully. The vulnerability arises because the CONST, XPACK, and XRLE encodings in htslib did not correctly implement the interface to handle these omitted data records, leading to attempts to write to a NULL pointer during decoding. This NULL pointer dereference results in a program crash, causing a denial-of-service condition. The issue affects htslib versions before 1.21.1, versions from 1.22 up to but not including 1.22.2, and version 1.23.1. The vulnerability requires no authentication or user interaction and can be triggered remotely by processing crafted CRAM files. There are no known exploits in the wild, and no workaround exists other than applying the fixed versions. The CVSS 4.0 base score of 6.9 reflects the medium severity, with network attack vector, low complexity, no privileges required, and no user interaction needed. The impact is limited to availability due to crashes, with no direct confidentiality or integrity compromise. This vulnerability is particularly relevant to organizations processing genomic data using samtools and htslib, including research labs, healthcare institutions, and biotech firms.
Potential Impact
The primary impact of CVE-2026-31964 is denial of service caused by application crashes when processing specially crafted CRAM files with omitted sequence or quality data using vulnerable htslib versions. This can disrupt bioinformatics workflows, delay genomic data analysis, and potentially halt critical research or clinical diagnostics relying on samtools. While the vulnerability does not directly expose sensitive data or allow code execution, the availability impact can be significant in environments where continuous processing of large genomic datasets is essential. Organizations relying on automated pipelines for DNA sequence alignment and analysis may experience interruptions, leading to operational delays and increased costs. Additionally, if exploited in a targeted manner, attackers could disrupt services in research or healthcare settings, impacting patient care or scientific progress. The lack of authentication or user interaction requirements increases the risk of remote exploitation by submitting malicious CRAM files to vulnerable systems.
Mitigation Recommendations
The only effective mitigation is to upgrade htslib to version 1.21.1, 1.22.2, 1.23.1, or later, where the NULL pointer dereference issue has been fixed. Organizations should audit their environments to identify all instances of samtools and htslib and verify the versions in use. Automated deployment tools can facilitate rapid patching across research clusters and production systems. Since no workaround exists, blocking or filtering CRAM files from untrusted sources may reduce exposure but is not a substitute for patching. Implementing input validation and sandboxing bioinformatics processing pipelines can limit the impact of crashes. Monitoring for abnormal application crashes or denial-of-service symptoms during CRAM file processing can help detect exploitation attempts. Finally, maintaining an inventory of bioinformatics tools and dependencies and integrating vulnerability management into research IT operations will improve resilience against similar issues.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-10T15:40:10.484Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69baf24a771bdb1749bb3c5b
Added to database: 3/18/2026, 6:43:22 PM
Last enriched: 3/18/2026, 6:58:06 PM
Last updated: 3/18/2026, 7:50:21 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.