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
    • 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-2023-25136

CVE-2023-25136: OpenBSD OpenSSH Double-Free RCE Vulnerability

CVE-2023-25136 is a critical double-free vulnerability in OpenSSH 9.1 that enables unauthenticated remote attackers to potentially execute arbitrary code. This article covers technical details, affected versions, and mitigation.

Published: February 11, 2026

CVE-2023-25136 Overview

CVE-2023-25136 is a double-free memory corruption vulnerability affecting OpenSSH server (sshd) version 9.1. The vulnerability was introduced in the options.kex_algorithms handling code, which improperly manages memory during key exchange algorithm processing. An unauthenticated remote attacker can exploit this vulnerability in the default configuration to potentially jump to any location in the sshd address space. While direct remote code execution remains theoretically possible according to third-party analysis, the primary confirmed impact is a denial of service condition through memory corruption.

Critical Impact

Unauthenticated remote attackers can trigger a double-free condition in the sshd process, potentially enabling arbitrary memory access and denial of service against SSH servers running OpenSSH 9.1.

Affected Products

  • OpenBSD OpenSSH 9.1
  • Fedora 37 and Fedora 38
  • NetApp ONTAP Select Deploy Administration Utility
  • NetApp A250 Firmware
  • NetApp 500F Firmware
  • NetApp C250 Firmware

Discovery Timeline

  • 2023-02-03 - CVE-2023-25136 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-25136

Vulnerability Analysis

The vulnerability exists in the compat.c file of OpenSSH, specifically in the code responsible for filtering and handling key exchange algorithms. When processing the kex_algorithms option, the code fails to consistently return allocated strings from the filtering function. This inconsistency leads to a scenario where the same memory can be freed twice—a classic double-free condition.

Double-free vulnerabilities are particularly dangerous because they corrupt the memory allocator's internal data structures. When the same memory region is freed twice, it can be placed on the allocator's free list multiple times. Subsequent allocations may then return the same memory region to different parts of the program, leading to use-after-free conditions and potential arbitrary code execution.

The JFrog OpenSSH CVE-2023-25136 Analysis provides detailed technical analysis demonstrating how this vulnerability can be exploited in the pre-authentication phase, making it accessible to completely unauthenticated attackers.

Root Cause

The root cause lies in inconsistent memory management within the key exchange algorithm filtering code in compat.c. The filtering function did not always return newly allocated strings, leading to situations where the calling code would attempt to free memory that was either not dynamically allocated or had already been freed. The fix ensures that the function always returns allocated strings, providing consistent memory ownership semantics.

Attack Vector

This vulnerability is exploitable over the network without requiring authentication. An attacker can send specially crafted SSH connection requests that trigger the vulnerable code path during the key exchange negotiation phase. The attack occurs before authentication, meaning any system running an exposed OpenSSH 9.1 server is potentially vulnerable. The attacker can leverage the double-free condition to corrupt heap metadata and potentially redirect execution flow.

c
-/* $OpenBSD: compat.c,v 1.119 2021/09/10 05:46:09 djm Exp $ */
+/* $OpenBSD: compat.c,v 1.120 2022/07/01 03:35:45 dtucker Exp $ */
 /*
  * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  *

Source: GitHub OpenSSH Commit

The patch modifies the compat.c file to ensure consistent memory allocation behavior in the kex filtering functions, eliminating the double-free condition.

Detection Methods for CVE-2023-25136

Indicators of Compromise

  • Unexpected sshd process crashes or restarts in system logs
  • Core dumps from sshd processes indicating heap corruption
  • Anomalous SSH connection attempts with malformed key exchange parameters
  • Memory corruption signatures in sshd process address space

Detection Strategies

  • Monitor SSH server logs for repeated connection failures during key exchange phase
  • Implement intrusion detection rules to identify unusual SSH handshake patterns
  • Deploy memory corruption detection tools on systems running vulnerable OpenSSH versions
  • Use version scanning to identify systems running OpenSSH 9.1

Monitoring Recommendations

  • Enable verbose logging on SSH servers to capture detailed connection information
  • Configure alerting for sshd service crashes or unexpected restarts
  • Monitor for high volumes of failed SSH connection attempts from single sources
  • Review system audit logs for signs of exploitation attempts

How to Mitigate CVE-2023-25136

Immediate Actions Required

  • Upgrade OpenSSH to version 9.2 or later immediately
  • Apply the official OpenBSD patch for systems running OpenBSD 7.2
  • Restrict SSH access to trusted IP ranges using firewall rules
  • Consider temporarily disabling SSH access on critical systems until patching is complete

Patch Information

OpenSSH 9.2 contains the fix for this vulnerability. The official patch is available from OpenBSD Patch for SSHD. The specific commit addressing this issue is available at GitHub OpenSSH Commit. Fedora users should apply updates through their package manager as documented in the Fedora Package Announcement. NetApp users should consult the NetApp Security Advisory for product-specific guidance.

Workarounds

  • Implement network-level access controls to limit SSH exposure to trusted networks only
  • Use a bastion host or jump server to reduce direct SSH exposure
  • Deploy intrusion prevention systems (IPS) with signatures for SSH exploitation attempts
  • Consider using alternative remote access methods temporarily while patching is scheduled
bash
# Restrict SSH access to trusted networks using iptables
iptables -A INPUT -p tcp --dport 22 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j DROP

# Verify OpenSSH version
ssh -V

# Check for available updates (Debian/Ubuntu)
apt-cache policy openssh-server

# Apply updates (Debian/Ubuntu)
apt update && apt upgrade openssh-server

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpenssh

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability90.48%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-415
  • Technical References
  • Openwall OSS Security Notice

  • Openwall OSS Security Update

  • Openwall OSS Security Update

  • Openwall OSS Security Announcement

  • Openwall OSS Security Notice

  • Openwall OSS Security Update

  • Mindrot Bug Report #3522

  • JFrog OpenSSH CVE-2023-25136 Analysis

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Hacker News Discussion

  • Gentoo GLSA 202307-01

  • NetApp Security Advisory

  • Openwall OSS Security Notice
  • Vendor Resources
  • OpenBSD Patch for SSHD

  • GitHub OpenSSH Commit
  • Related CVEs
  • CVE-2026-35386: OpenSSH RCE Vulnerability via Metacharacters

  • CVE-2025-61984: OpenSSH RCE Vulnerability

  • CVE-2023-51385: OpenBSD OpenSSH RCE Vulnerability

  • CVE-2020-15778: OpenSSH SCP Command Injection 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