A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-41681

CVE-2026-41681: Rust-openssl Buffer Overflow Vulnerability

CVE-2026-41681 is a buffer overflow vulnerability in rust-openssl that causes stack corruption when MdCtxRef::digest_final() writes beyond buffer bounds. This article covers technical details, affected versions, and mitigation.

Published: April 30, 2026

CVE-2026-41681 Overview

CVE-2026-41681 is a stack buffer overflow vulnerability in rust-openssl, a library that provides OpenSSL bindings for the Rust programming language. The vulnerability exists in versions 0.10.39 through 0.10.77, where the MdCtxRef::digest_final() function can write past the end of a provided output buffer.

The core issue stems from how EVP_DigestFinal() operates—it always writes EVP_MD_CTX_size(ctx) bytes to the output buffer. When the provided out buffer is smaller than this size, the function writes beyond its boundaries, typically corrupting the stack. Critically, this vulnerability is reachable from safe Rust code, undermining one of Rust's core memory safety guarantees.

Critical Impact

Stack buffer overflow reachable from safe Rust code can lead to stack corruption, potential code execution, and defeats Rust's memory safety guarantees.

Affected Products

  • rust-openssl versions 0.10.39 to 0.10.77
  • Applications using MdCtxRef::digest_final() with undersized output buffers
  • Rust projects with rust-openssl as a dependency in the affected version range

Discovery Timeline

  • 2026-04-24 - CVE CVE-2026-41681 published to NVD
  • 2026-04-28 - Last updated in NVD database

Technical Details for CVE-2026-41681

Vulnerability Analysis

This vulnerability represents a significant breach of Rust's memory safety model. Rust is designed to prevent memory corruption bugs through its ownership system and borrow checker, but unsafe code in FFI (Foreign Function Interface) bindings can still introduce vulnerabilities. In this case, the rust-openssl library's binding to OpenSSL's EVP_DigestFinal() function failed to validate that the output buffer was large enough to receive the digest output.

The EVP_DigestFinal() function from OpenSSL writes a fixed number of bytes determined by EVP_MD_CTX_size(ctx), which varies depending on the hash algorithm in use (e.g., 32 bytes for SHA-256, 64 bytes for SHA-512). If an application provides a smaller buffer, the function overwrites adjacent stack memory, leading to corruption.

Root Cause

The root cause is a missing bounds check in MdCtxRef::digest_final() before calling the underlying OpenSSL EVP_DigestFinal() function. The function accepted any slice as output without verifying its size against the expected digest length. This allowed callers to inadvertently trigger a stack buffer overflow by providing an undersized buffer.

Attack Vector

The vulnerability is exploitable over the network in scenarios where:

  1. An application uses rust-openssl for cryptographic operations
  2. User-controlled data influences the size of the output buffer passed to digest_final()
  3. The attacker can trigger digest computations with undersized buffers

Exploitation could lead to stack corruption, denial of service through crashes, or potentially arbitrary code execution if an attacker can carefully control the overflow data.

rust
    pub fn digest_final(&mut self, out: &mut [u8]) -> Result<usize, ErrorStack> {
        let mut len = u32::try_from(out.len()).unwrap_or(u32::MAX);

+        if self.size() > len as usize {
+            return Err(ErrorStack::get());
+        }
+
        unsafe {
            cvt(ffi::EVP_DigestFinal(
                self.as_ptr(),

Source: GitHub Commit Update

The patch adds a bounds check that compares the expected digest size (self.size()) against the provided buffer length before calling the unsafe FFI function. If the buffer is too small, it returns an error instead of proceeding with the overflow.

Detection Methods for CVE-2026-41681

Indicators of Compromise

  • Unexpected application crashes with stack corruption patterns in rust-openssl-dependent applications
  • Segmentation faults or memory access violations during cryptographic operations
  • Anomalous behavior in applications processing user-supplied cryptographic parameters
  • Core dumps showing stack smashing or canary violations in digest-related code paths

Detection Strategies

  • Audit Cargo.lock and Cargo.toml files for rust-openssl versions between 0.10.39 and 0.10.77
  • Use cargo audit to scan Rust projects for known vulnerable dependencies
  • Deploy runtime memory protection tools (ASAN, stack canaries) to detect overflow attempts
  • Monitor application logs for ErrorStack or digest-related errors that may indicate exploitation attempts

Monitoring Recommendations

  • Implement continuous dependency scanning in CI/CD pipelines using tools like cargo-deny or cargo-audit
  • Enable stack protection mechanisms (stack canaries, ASLR) on production systems
  • Set up alerts for unexpected crashes in applications using cryptographic libraries
  • Review application code for patterns passing user-controlled buffer sizes to digest functions

How to Mitigate CVE-2026-41681

Immediate Actions Required

  • Upgrade rust-openssl to version 0.10.78 or later immediately
  • Run cargo update -p openssl to update the dependency in your project
  • Rebuild and redeploy all affected applications after the upgrade
  • Audit code for patterns that pass potentially undersized buffers to digest_final()

Patch Information

The vulnerability is fixed in rust-openssl version 0.10.78. The fix introduces a bounds check that validates the output buffer size against the expected digest length before calling the underlying OpenSSL function.

  • Fixed Version:0.10.78
  • Patch Commit:826c3888b77add418b394770e2b2e3a72d9f92fe
  • Security Advisory:GHSA-ghm9-cr32-g9qj
  • Release Notes:openssl-v0.10.78

Workarounds

  • Ensure all buffers passed to digest_final() are at least as large as the expected digest size for the algorithm in use
  • Use MdCtx::size() to determine the required buffer size before calling digest_final()
  • Consider using higher-level APIs that handle buffer sizing automatically
  • If upgrading is not immediately possible, add manual bounds checks before calling digest functions
bash
# Update rust-openssl dependency
cargo update -p openssl

# Verify the updated version
cargo tree -p openssl | grep openssl

# Run security audit
cargo audit

# Rebuild the project
cargo build --release

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechRust Openssl

  • SeverityHIGH

  • CVSS Score8.1

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/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
  • AvailabilityHigh
  • CWE References
  • CWE-121
  • Technical References
  • GitHub Pull Request

  • GitHub Release Note
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-41678: Rust-openssl Buffer Overflow Vulnerability

  • CVE-2026-41677: Rust-openssl Buffer Overflow Vulnerability

  • CVE-2025-24898: rust-openssl Use-After-Free Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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