Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31962

CVE-2026-31962: Htslib CRAM Buffer Overflow Vulnerability

CVE-2026-31962 is a heap buffer overflow in Htslib's CRAM decoder that allows attackers to execute arbitrary code. This article covers the technical details, affected versions, security impact, and mitigation steps.

Published: March 20, 2026

CVE-2026-31962 Overview

CVE-2026-31962 is a heap buffer overflow vulnerability in HTSlib, a widely-used library for reading and writing bioinformatics file formats. The vulnerability exists in the cram_decode_seq() function which improperly handles certain CRAM alignment records that omit DNA sequence and quality values. When processing specially crafted CRAM files, the function fails to correctly manage these edge cases, resulting in an out-of-bounds memory access that reads a single byte beyond a heap allocation and subsequently writes an attacker-controlled byte to that same location.

Critical Impact

Successful exploitation could lead to application crashes, data corruption, or arbitrary code execution when processing malicious CRAM files.

Affected Products

  • HTSlib versions prior to 1.21.1
  • HTSlib versions 1.22.x prior to 1.22.2
  • HTSlib version 1.23

Discovery Timeline

  • 2026-03-18 - CVE-2026-31962 published to NVD
  • 2026-03-19 - Last updated in NVD database

Technical Details for CVE-2026-31962

Vulnerability Analysis

The vulnerability stems from improper handling of CRAM format alignment records within the cram_decode_seq() function. CRAM is a compressed file format designed to efficiently store DNA sequence alignment data. While most alignment records contain DNA sequence and quality values, the format specification allows records to omit this data in certain circumstances to reduce file size.

Due to specific quirks in the CRAM format, these omitted-data records still contain data that must be consumed and discarded during parsing. The cram_decode_seq() function fails to handle this scenario correctly in some edge cases. This improper handling results in the function reading a single byte from beyond the boundary of a heap-allocated buffer, followed by writing an attacker-controlled byte to that same out-of-bounds location.

This heap buffer overflow can be triggered when a user opens a maliciously crafted CRAM file. The consequences range from application crashes due to memory corruption to potential arbitrary code execution if an attacker can precisely control the heap layout and the written byte value.

Root Cause

The root cause is a boundary condition error (CWE-122: Heap-based Buffer Overflow) in the cram_decode_seq() function. The function fails to properly account for CRAM alignment records that omit sequence and quality data, leading to incorrect buffer boundary calculations during the decode operation.

Attack Vector

This vulnerability is exploited via network delivery of malicious CRAM files. An attacker would craft a CRAM file that triggers the vulnerable code path in cram_decode_seq(). The attack requires user interaction—specifically, the victim must open the malicious file using an application that relies on HTSlib for CRAM file processing. Bioinformatics pipelines, genome analysis tools, and scientific research applications commonly use HTSlib, making research institutions and healthcare organizations potential targets.

The exploitation process involves:

  1. Crafting a CRAM file with alignment records specifically designed to trigger the improper handling in cram_decode_seq()
  2. Delivering the file to the victim via email attachment, file sharing, or other distribution methods
  3. Victim opens the file with a vulnerable HTSlib-based application
  4. The heap buffer overflow occurs, potentially allowing code execution

Detection Methods for CVE-2026-31962

Indicators of Compromise

  • Unexpected crashes in applications using HTSlib when processing CRAM files
  • Abnormal memory access patterns or segmentation faults during bioinformatics file processing
  • Presence of suspicious or unexpected CRAM files in processing directories
  • Unusual application behavior following CRAM file parsing operations

Detection Strategies

  • Monitor for application crashes with stack traces referencing cram_decode_seq() or related HTSlib functions
  • Implement file integrity monitoring on bioinformatics data directories to detect introduction of malicious CRAM files
  • Deploy endpoint detection solutions capable of identifying heap corruption exploitation attempts
  • Review application logs for errors related to CRAM file parsing failures

Monitoring Recommendations

  • Enable verbose logging for HTSlib-based applications to capture parsing errors
  • Monitor memory allocation patterns for applications processing CRAM files
  • Implement network traffic analysis to detect potentially malicious CRAM files being delivered via email or file transfer
  • Establish baseline behavior for bioinformatics applications to identify anomalous activity

How to Mitigate CVE-2026-31962

Immediate Actions Required

  • Upgrade HTSlib to patched versions 1.21.1, 1.22.2, or 1.23.1 immediately
  • Audit systems and applications to identify all instances of HTSlib usage
  • Restrict processing of CRAM files from untrusted sources until patching is complete
  • Notify users of bioinformatics applications about the vulnerability and remediation steps

Patch Information

The HTSlib maintainers have released security patches in versions 1.21.1, 1.22.2, and 1.23.1 that address this heap buffer overflow vulnerability. The fix is available in commit d799b54c6401879187bba4741be83ff590ac73e3. Organizations should consult the GitHub Security Advisory GHSA-xxmp-v7h3-gpwp for complete details on affected versions and upgrade paths.

Workarounds

  • No official workarounds are available for this vulnerability according to the vendor advisory
  • As a temporary measure, avoid processing CRAM files from untrusted or unknown sources
  • Consider implementing application sandboxing to limit the impact of potential exploitation
  • Prioritize patching as the only reliable remediation method
bash
# Upgrade HTSlib to patched version
# For version 1.21.x series:
git clone https://github.com/samtools/htslib.git
cd htslib
git checkout v1.21.1
make && make install

# Verify installed version
htsfile --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechHtslib

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-122
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-xxmp-v7h3-gpwp
  • Related CVEs
  • CVE-2026-31968: Htslib Buffer Overflow Vulnerability

  • CVE-2026-31963: Htslib CRAM Buffer Overflow Vulnerability

  • CVE-2026-31969: HTSlib Buffer Overflow Vulnerability

  • CVE-2026-31970: Htslib Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English