The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-31969

CVE-2026-31969: HTSlib Buffer Overflow Vulnerability

CVE-2026-31969 is a buffer overflow vulnerability in HTSlib affecting CRAM file processing that allows heap corruption. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 20, 2026

CVE-2026-31969 Overview

CVE-2026-31969 is a heap buffer overflow vulnerability in HTSlib, a widely-used library for reading and writing bioinformatics file formats including CRAM (Compressed Reference-oriented Alignment Map). The vulnerability exists in the cram_byte_array_stop_decode_char() function, where an off-by-one error in the buffer boundary check allows a single attacker-controlled byte to be written beyond the end of a heap allocation when processing maliciously crafted CRAM files.

Critical Impact

This heap buffer overflow could allow attackers to crash bioinformatics applications, corrupt heap data structures, and potentially achieve arbitrary code execution through specially crafted 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 CVE-2026-31969 published to NVD
  • 2026-03-19 - Last updated in NVD database

Technical Details for CVE-2026-31969

Vulnerability Analysis

This vulnerability affects the CRAM file format decoder within HTSlib. CRAM is a compressed format designed for storing DNA sequence alignment data using various encoding and compression methods. One such encoding method, BYTE_ARRAY_STOP, is used to encode variable-length byte arrays terminated by a specific stop byte.

The flaw resides in the cram_byte_array_stop_decode_char() function, which fails to correctly validate whether the output buffer has sufficient space before writing data. Due to an off-by-one error in the boundary checking logic, when the output buffer is full, the function incorrectly permits one additional byte to be written past the allocated heap buffer boundary.

This type of vulnerability is particularly concerning in the bioinformatics domain where researchers routinely process untrusted data files from public repositories and collaborative research projects. An attacker could craft a malicious CRAM file that, when opened by a vulnerable application using HTSlib, triggers the heap overflow condition.

Root Cause

The root cause is an off-by-one error (CWE-122: Heap-based Buffer Overflow) in the boundary validation logic of the cram_byte_array_stop_decode_char() function. The check meant to prevent writes past the end of the allocated buffer incorrectly uses a comparison operator that allows exactly one byte to be written beyond the buffer boundary. This single-byte overflow, while seemingly minor, can corrupt adjacent heap metadata or data structures, leading to exploitable conditions.

Attack Vector

The attack requires user interaction—a victim must open a maliciously crafted CRAM file using an application that links against a vulnerable version of HTSlib. The attack is network-accessible as malicious files can be distributed via file sharing, email attachments, public data repositories, or compromised research databases.

When the vulnerable code path is triggered during file parsing, the attacker-controlled byte overwrites heap memory. Depending on the heap layout and allocator behavior, this can result in:

  1. Application crash - Immediate denial of service
  2. Heap metadata corruption - Enabling heap exploitation techniques
  3. Arbitrary code execution - Through careful heap manipulation and subsequent allocation patterns
c
 /*
-Copyright (c) 2012-2021,2023, 2025 Genome Research Ltd.
+Copyright (c) 2012-2021,2023, 2025, 2026 Genome Research Ltd.
 Author: James Bonfield <jkb@sanger.ac.uk>

 Redistribution and use in source and binary forms, with or without

Source: GitHub Commit Update

The security patch corrects the boundary check in the CRAM codec implementation to properly validate buffer limits before writing data.

Detection Methods for CVE-2026-31969

Indicators of Compromise

  • Unexpected crashes in applications using HTSlib when processing CRAM files
  • Abnormal memory allocation patterns or heap corruption errors in bioinformatics pipelines
  • Core dumps or segmentation faults during CRAM file parsing operations
  • Suspicious CRAM files with unusual BYTE_ARRAY_STOP encoded data sections

Detection Strategies

  • Monitor application logs for crashes or memory errors when processing CRAM format files
  • Implement file integrity checks and source validation for CRAM files from external sources
  • Use memory sanitizers (AddressSanitizer, Valgrind) during development to detect heap overflows
  • Deploy endpoint detection solutions capable of identifying heap exploitation attempts

Monitoring Recommendations

  • Track HTSlib version usage across bioinformatics infrastructure and flag vulnerable versions
  • Establish alerting for unusual process terminations in genome analysis pipelines
  • Monitor network traffic for downloads of CRAM files from untrusted or suspicious sources
  • Implement centralized logging for all file processing operations in research environments

How to Mitigate CVE-2026-31969

Immediate Actions Required

  • Update HTSlib to patched versions: 1.21.1, 1.22.2, or 1.23.1 immediately
  • Audit systems to identify all applications and dependencies using vulnerable HTSlib versions
  • Restrict processing of CRAM files to trusted sources until patching is complete
  • Review and update any Docker containers, Conda environments, or bioinformatics packages that bundle HTSlib

Patch Information

The HTSlib maintainers have released security updates to address this vulnerability. The fix corrects the boundary checking logic in the cram_byte_array_stop_decode_char() function to prevent the off-by-one heap overflow.

Fixed Versions:

  • HTSlib 1.21.1
  • HTSlib 1.22.2
  • HTSlib 1.23.1

For detailed patch information, refer to the GitHub Security Advisory GHSA-q4cj-f4h5-fqgc and the security patch commit.

Workarounds

  • There is no workaround for this vulnerability; patching is the only remediation
  • As a temporary risk reduction measure, avoid processing CRAM files from untrusted sources
  • Consider using alternative file formats (BAM/SAM) where possible until systems are patched
  • Isolate vulnerable systems in sandboxed environments with restricted network access
bash
# Verify HTSlib version and update
# Check current version
htsfile --version

# Update via package manager (example for Conda)
conda update -c bioconda htslib

# Verify updated version is patched
htsfile --version | grep -E "1\.(21\.1|22\.2|23\.1)"

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 Score7.1

  • EPSS Probability0.08%

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

  • GitHub Security Advisory GHSA-q4cj-f4h5-fqgc
  • Related CVEs
  • CVE-2026-31968: Htslib Buffer Overflow Vulnerability

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

  • CVE-2026-31963: Htslib CRAM 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