SentinelOne
CVE Vulnerability Database
Vulnerability Database/CVE-2025-30211

CVE-2025-30211: Erlang/OTP Denial of Service Vulnerability

CVE-2025-30211 is a denial of service vulnerability in Erlang/OTP caused by malformed KEX init messages leading to excessive memory usage. This article covers technical details, affected versions, and mitigations.

Updated:

CVE-2025-30211 Overview

CVE-2025-30211 is a memory exhaustion vulnerability affecting the Erlang/OTP SSH implementation. The vulnerability exists in the Key Exchange (KEX) initialization message handling, where the implementation fails to enforce RFC-specified limits on algorithm names. When an attacker sends a maliciously crafted KEX init message containing excessively long algorithm names, the system allocates large amounts of memory for processing, leading to resource exhaustion and denial of service conditions.

The Erlang/OTP platform is widely used for building scalable, fault-tolerant distributed systems, including telecommunications infrastructure, messaging platforms, and real-time applications. This vulnerability in the SSH subsystem could allow remote attackers to disrupt critical services without authentication.

Critical Impact

Remote attackers can cause denial of service through memory exhaustion by sending malformed SSH KEX init packets, potentially disrupting critical Erlang/OTP-based infrastructure and services.

Affected Products

  • Erlang/OTP versions prior to OTP-27.3.1
  • Erlang/OTP versions prior to OTP-26.2.5.10
  • Erlang/OTP versions prior to OTP-25.3.2.19

Discovery Timeline

  • 2025-03-28 - CVE-2025-30211 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-30211

Vulnerability Analysis

This vulnerability (CWE-789: Memory Allocation with Excessive Size Value) stems from improper input validation in the SSH protocol implementation within Erlang/OTP. The SSH Key Exchange (KEX) protocol defines specific limits for algorithm name lengths as outlined in RFC specifications, with a maximum of 64 characters per algorithm name. However, the affected Erlang/OTP implementations do not enforce these limits during KEX init message processing.

When a KEX init packet arrives with algorithm names exceeding the expected bounds, the SSH implementation attempts to process the oversized data. This triggers inefficient error handling routines that allocate disproportionate amounts of memory relative to the input size. The network-accessible nature of SSH services means attackers can exploit this vulnerability remotely without any authentication or user interaction.

Root Cause

The root cause lies in missing boundary checks for algorithm name lengths during SSH KEX initialization. The RFC specification mandates that algorithm names should not exceed 64 characters, but the Erlang/OTP SSH implementation did not validate incoming algorithm names against this limit before allocating memory for processing. When malformed packets contain oversized algorithm names, the error handling path performs memory-intensive operations without proper size constraints, amplifying the impact of the malicious input.

Attack Vector

An attacker can exploit this vulnerability by establishing an SSH connection to a vulnerable Erlang/OTP SSH server and sending a specially crafted KEX init message during the key exchange phase. The attack occurs early in the SSH handshake, before authentication takes place, making it particularly dangerous as no credentials are required.

The attack can be amplified when the parallel_login option is enabled (the default setting), as this allows multiple concurrent connection attempts. Each malicious connection consumes excessive memory, and an attacker sending multiple parallel requests can rapidly exhaust available system memory, causing service degradation or complete denial of service.

The vulnerability mechanism involves sending KEX init packets with algorithm name-list fields containing strings far exceeding the 64-character limit. The server's attempt to parse and process these oversized names triggers the memory exhaustion condition. For detailed technical information, refer to the GitHub Security Advisory.

Detection Methods for CVE-2025-30211

Indicators of Compromise

  • Unusual memory consumption spikes on systems running Erlang/OTP SSH services
  • Multiple failed or incomplete SSH handshakes from single or distributed source IPs
  • Abnormally large SSH KEX init packets observed in network traffic captures
  • System logs showing memory allocation failures or out-of-memory conditions coinciding with SSH connection attempts

Detection Strategies

  • Monitor SSH connection rates and flag sources exceeding normal thresholds during the KEX phase
  • Implement network-level inspection for SSH packets with anomalously large KEX init payloads
  • Deploy memory usage alerting on Erlang/OTP processes with thresholds for sudden consumption increases
  • Analyze SSH connection logs for patterns of incomplete handshakes or KEX failures

Monitoring Recommendations

  • Enable detailed SSH logging in Erlang/OTP applications to capture connection metadata and failure reasons
  • Configure system-level memory monitoring with alerts for rapid consumption by BEAM (Erlang VM) processes
  • Implement rate limiting on SSH connection attempts at the network perimeter
  • Use intrusion detection systems with signatures for malformed SSH KEX packets

How to Mitigate CVE-2025-30211

Immediate Actions Required

  • Upgrade to Erlang/OTP versions OTP-27.3.1, OTP-26.2.5.10, or OTP-25.3.2.19 or later immediately
  • Apply workarounds if immediate patching is not possible: set parallel_login to false and reduce max_sessions
  • Review and restrict network access to SSH services to trusted IP ranges only
  • Monitor affected systems for signs of exploitation attempts while patching is in progress

Patch Information

Security patches addressing this vulnerability have been released in Erlang/OTP versions OTP-27.3.1, OTP-26.2.5.10, and OTP-25.3.2.19. These patches implement proper validation of algorithm name lengths according to RFC specifications, preventing memory exhaustion from malformed KEX init packets.

Organizations should update to the patched versions corresponding to their major release branch. For additional details on the patches and the vulnerability, see the GitHub Security Advisory. Debian users should also review the Debian LTS Announcement for distribution-specific guidance.

Workarounds

  • Set the parallel_login SSH daemon option to false to prevent concurrent connection processing that amplifies memory exhaustion
  • Reduce the max_sessions option to limit the number of simultaneous SSH sessions
  • Implement network-level rate limiting for SSH connections to reduce the attack surface
  • Deploy a reverse proxy or load balancer with connection throttling in front of SSH services
bash
# Configuration example for Erlang/OTP SSH daemon options
# Add these options to your SSH daemon configuration to mitigate the vulnerability

# Disable parallel login processing
{parallel_login, false}

# Limit maximum concurrent sessions (adjust based on your requirements)
{max_sessions, 10}

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

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.