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-2021-23840

CVE-2021-23840: OpenSSL Buffer Overflow Vulnerability

CVE-2021-23840 is a buffer overflow vulnerability in OpenSSL affecting EVP cipher functions. It causes output length argument overflow leading to crashes or incorrect behavior. This article covers technical details, affected versions, impact, and mitigation steps.

Published: February 25, 2026

CVE-2021-23840 Overview

CVE-2021-23840 is an Integer Overflow vulnerability affecting the OpenSSL cryptographic library. Calls to EVP_CipherUpdate, EVP_EncryptUpdate, and EVP_DecryptUpdate functions may overflow the output length argument when the input length approaches the maximum permissible value for an integer on the platform. When this overflow occurs, the function incorrectly returns 1 (indicating success) while setting the output length value to a negative number, potentially causing applications to behave incorrectly or crash.

This vulnerability represents a significant risk to applications relying on OpenSSL for encryption and decryption operations, particularly those processing large data blocks. The widespread deployment of OpenSSL across enterprise infrastructure, web servers, and embedded devices amplifies the potential impact of this flaw.

Critical Impact

Applications using vulnerable OpenSSL versions may crash or exhibit undefined behavior when processing large encryption/decryption operations, potentially leading to denial of service conditions.

Affected Products

  • OpenSSL versions 1.1.1 through 1.1.1i
  • OpenSSL versions 1.0.2 through 1.0.2x
  • Debian Linux 10.0
  • Oracle MySQL Server, GraalVM, Business Intelligence
  • Node.js (multiple versions)
  • Tenable Log Correlation Engine and Nessus Network Monitor
  • McAfee ePolicy Orchestrator
  • Fujitsu M10 and M12 series firmware

Discovery Timeline

  • February 16, 2021 - CVE-2021-23840 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-23840

Vulnerability Analysis

The vulnerability exists within OpenSSL's EVP (Envelope) cipher API functions. When an application calls EVP_CipherUpdate, EVP_EncryptUpdate, or EVP_DecryptUpdate with an input length value approaching INT_MAX, an arithmetic overflow can occur during the calculation of the output buffer length. This integer overflow causes the output length parameter to wrap around to a negative value.

The dangerous aspect of this vulnerability is that the function still returns a success code (1) despite the overflow condition. Applications that rely on the output length value to determine how much data was processed will receive incorrect information, potentially leading to buffer mismanagement, application crashes, or unpredictable behavior in cryptographic operations.

Root Cause

The root cause is an Integer Overflow (CWE-190) in the output length calculation within the EVP cipher functions. The functions fail to properly validate that the computed output length will fit within the bounds of a signed integer before performing arithmetic operations. When the input data size is sufficiently large (close to platform integer limits), the calculation overflows, producing a negative result that passes through without proper error handling.

Attack Vector

An attacker can exploit this vulnerability through network-accessible services that process encrypted data using OpenSSL. The exploitation requires the ability to influence the size of data being processed by the vulnerable cipher functions. Attack scenarios include:

  • Sending specially crafted large encrypted payloads to applications using OpenSSL for TLS/SSL processing
  • Targeting applications that allow user-controlled data sizes in encryption/decryption operations
  • Exploiting web servers, database connections, or any network service relying on OpenSSL for cryptographic operations

The vulnerability is exploitable remotely without requiring authentication or user interaction, making it particularly concerning for internet-facing services.

Detection Methods for CVE-2021-23840

Indicators of Compromise

  • Application crashes or unexpected terminations during large data encryption/decryption operations
  • Negative values appearing in logging or debugging output related to buffer sizes in cryptographic operations
  • Memory corruption signatures or segmentation faults in processes using OpenSSL
  • Unexpected service restarts or denial of service conditions affecting OpenSSL-dependent applications

Detection Strategies

  • Inventory all systems running OpenSSL and identify versions prior to 1.1.1j or 1.0.2y
  • Monitor application logs for abnormal termination signals or crash reports related to cryptographic functions
  • Deploy vulnerability scanning tools to identify affected OpenSSL library versions across the infrastructure
  • Use software composition analysis (SCA) tools to identify applications bundling vulnerable OpenSSL versions

Monitoring Recommendations

  • Implement real-time monitoring for application stability metrics on services using OpenSSL
  • Configure alerts for unusual memory allocation patterns or negative buffer size calculations in cryptographic operations
  • Monitor system logs for crash dumps mentioning EVP cipher functions
  • Track version information of OpenSSL libraries deployed across all systems through asset management

How to Mitigate CVE-2021-23840

Immediate Actions Required

  • Upgrade OpenSSL to version 1.1.1j or later for systems running 1.1.1 branch
  • For systems still on OpenSSL 1.0.2 (Premium Support customers only), upgrade to version 1.0.2y
  • Migrate systems running OpenSSL 1.0.2 without premium support to the 1.1.1 branch, as 1.0.2 is end-of-life
  • Update all applications and dependencies that bundle OpenSSL libraries
  • Apply vendor-specific patches for affected products including Node.js, Oracle products, and Tenable tools

Patch Information

OpenSSL has released patched versions addressing this vulnerability. The fix is included in OpenSSL 1.1.1j for the 1.1.1 branch and 1.0.2y for premium support customers on the 1.0.2 branch. The patches implement proper bounds checking to prevent integer overflow in the output length calculation.

For detailed patch information, refer to the OpenSSL Security Advisory 20210216. The specific code changes can be reviewed in the OpenSSL git repository commit diffs: OpenSSL Commit Diff 6a51b9e and OpenSSL Commit Diff 9b1129.

Additional vendor advisories are available from Oracle CPU April 2021, Debian Security DSA-4855, and Tenable Security Advisory TNS-2021-03.

Workarounds

  • Implement input validation to reject excessively large data blocks before passing them to EVP cipher functions
  • Deploy network-level controls to limit the maximum size of encrypted payloads accepted by vulnerable services
  • Enable application-level protections that monitor and restrict buffer sizes in cryptographic operations
  • Consider temporarily disabling or isolating services that process large encrypted data volumes until patching is complete
bash
# Check OpenSSL version on Linux systems
openssl version -a

# Verify patched version is installed (should be 1.1.1j or later)
openssl version | grep -E "1\.1\.1[j-z]|1\.0\.2y"

# List packages depending on OpenSSL for comprehensive patching
# Debian/Ubuntu
dpkg -l | grep -i openssl
apt list --installed 2>/dev/null | grep -i ssl

# RHEL/CentOS
rpm -qa | grep -i openssl

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechOpenssl

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.41%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-190
  • Technical References
  • Siemens Security Advisory SSA-389290

  • OpenSSL Commit Diff 6a51b9e

  • OpenSSL Commit Diff 9b1129

  • Pulse Secure Advisory SA44846

  • McAfee Security Advisory SB10366

  • Apache Bookkeeper Issue Discussion

  • Apache Bookkeeper Issue Discussion

  • Gentoo GLSA 202103-03

  • NetApp Advisory NTAP-20210219-0009

  • NetApp Advisory NTAP-20240621-0006

  • Debian Security DSA-4855

  • Tenable Security Advisory TNS-2021-03

  • Tenable Security Advisory TNS-2021-09

  • Tenable Security Advisory TNS-2021-10
  • Vendor Resources
  • OpenSSL Security Advisory 20210216

  • Oracle CPU July 2021 Alerts

  • Oracle CPU April 2021 Alerts

  • Oracle CPU April 2022 Alerts

  • Oracle CPU January 2022 Alerts

  • Oracle CPU October 2021 Alerts
  • Related CVEs
  • CVE-2025-15467: OpenSSL Buffer Overflow Vulnerability

  • CVE-2025-11187: OpenSSL Buffer Overflow Vulnerability

  • CVE-2025-69419: OpenSSL Buffer Overflow Vulnerability

  • CVE-2022-3786: OpenSSL 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