CVE-2026-124286 — CWE-347
Improper Verification of Cryptographic Signature vulnerability in Erlang OTP ssl (ssl_handshake module) allows an on-path attacker to impersonate any server to a TLS 1.2 or DTLS client. When a server sends no Certificate message and a ServerKeyExchange without a signature, ssl_handshake:decode_server_key/3 reports the signature algorithm as anon, and ssl_handshake:verify_signature/5 returns true for anon without a public key. The client does not require a certificate for a certificate-authenticated key exchange, so the handshake completes for the ecdhe_rsa, ecdhe_ecdsa, dhe_rsa and dhe_dss key exchanges with a cipher suite the client offered. Certificate path validation, verify_fun and the hostname check do not run, and ssl:connect/3 returns {ok, Socket} with {verify, verify_peer} set. The TLS 1.3 client is not affected. This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.9, and OTP 29.0.3, corresponding to ssl from 5.3.4 before 11.2.12.10, 11.6.0.8, and 11.7.3.
Improper Verification of Cryptographic Signature vulnerability in Erlang OTP ssl (ssl_handshake module) allows an on-path attacker to impersonate any server to a TLS 1.2 or DTLS client. When a server sends no Certificate message and a ServerKeyExchange without a signature, ssl_handshake:decode_server_key/3 reports the signature algorithm as anon, and ssl_handshake:verify_signature/5 returns true for anon without a public key. The client does not require a certificate for a certificate-authenticated key exchange, so the handshake completes for the ecdhe_rsa, ecdhe_ecdsa, dhe_rsa and dhe_dss key exchanges with a cipher suite the client offered. Certificate path validation, verify_fun and the hostname check do not run, and ssl:connect/3 returns {ok, Socket} with {verify, verify_peer} set. The TLS 1.3 client is not affected. This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.9, and OTP 29.0.3, corresponding to ssl from 5.3.4 before 11.2.12.10, 11.6.0.8, and 11.7.3.
🎯 What is this vulnerability?
This vulnerability is a Critical Improper Verification of Cryptographic Signature (CWE-347) flaw in the Erlang/OTP ssl module, specifically within the ssl_handshake logic for TLS 1.2 and DTLS clients.
The Technical Flaw:
The core issue lies in how the Erlang SSL client handles a malformed or malicious server handshake response. Specifically, when a server sends a ServerKeyExchange message without a signature and without a Certificate message, the client's internal logic fails to reject the handshake.
1. Logic Error in ssl_handshake:decode_server_key/3: When the signature is missing, the function incorrectly identifies the signature algorithm as anon (anonymous).
2. Bypass in ssl_handshake:verify_signature/5: The verification function is designed to check cryptographic signatures. However, it contains a logic path where if the algorithm is anon, it returns true (success) without requiring a public key or performing any cryptographic verification.
3. Missing Certificate Enforcement: For key exchange algorithms like ECDHE_RSA, ECDHE_ECDSA, DHE_RSA, and DHE_DSS, the TLS specification requires the server to prove its identity via a signed certificate. The vulnerable code path skips the requirement for a Certificate message entirely.
4. Bypass of Post-Handshake Checks: Because the handshake is considered "successful" by the client library, the subsequent security checks—Certificate Path Validation, verify_fun callbacks, and Hostname Verification—are never executed. The client returns {ok, Socket} with a verification status of verify_peer, falsely indicating a secure, authenticated connection.
Result: An on-path attacker can impersonate any server to any vulnerable Erlang/OTP TLS 1.2/DTLS client, effectively turning a secure connection into an unauthenticated, man-in-the-middle (MitM) channel. TLS 1.3 is not affected because it mandates different handshake structures and signature verification logic.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Target Identification: The attacker identifies systems running Erlang/OTP applications (e.g., RabbitMQ, CouchDB, Erlang-based microservices) that act as TLS 1.2 clients.
- Version Fingerprinting: Using tools like
nmapwith SSL scripts or passive traffic analysis, the attacker determines the OTP version. Vulnerable versions are OTP 17.0 through OTP 27.3.4.13, OTP 28.5.0.8, and OTP 29.0.2. - Positioning: The attacker positions themselves on the network path between the Erlang client and the legitimate server (e.g., via ARP spoofing, BGP hijacking, or compromised network infrastructure).
2. Exploitation
The attacker intercepts the TLS ClientHello and responds with a crafted ServerHello and ServerKeyExchange that omits the Certificate and Signature fields.Illustrative PoC Concept (Python scapy/tls library logic):
Note: This is an illustrative representation of the packet structure required to trigger the bug. Actual exploitation requires precise TLS state machine manipulation.
# Illustrative Exploit Logic for CVE-2026-124286
# The attacker intercepts ClientHello and sends a malicious ServerHello/ServerKeyExchange
from scapy.layers.tls.handshake import ServerHello, ServerKeyExchange, Certificate
from scapy.layers.tls.record import TLS
# 1. Intercept ClientHello
# client_hello = sniff(filter="tcp port 443", count=1)
# 2. Craft Malicious ServerHello
# Select a cipher suite that uses RSA/ECDSA/DSS key exchange (e.g., ECDHE-RSA-AES128-GCM-SHA256)
server_hello = ServerHello(
version=0x0303, # TLS 1.2
cipher_suite=0xC02F # ECDHE-RSA-AES128-GCM-SHA256
)
# 3. Craft Malicious ServerKeyExchange
# CRITICAL: Omit the 'signature' field or set it to empty/invalid
# The Erlang client will interpret this as 'anon' and skip verification
server_key_exchange = ServerKeyExchange(
# No Certificate message sent
# No valid signature provided
# This triggers the 'anon' path in ssl_handshake:verify_signature/5
)
# 4. Send the malicious handshake
# send(server_hello / server_key_exchange)
# 5. The Erlang client will complete the handshake, believing it is secure.
# The attacker can now decrypt and modify all traffic.Key Exploitation Mechanics:
{ok, Socket}.3. Post-Exploitation
Once the MitM is established:🌍 Real World Impact
CVSS 4.0 Vector Analysis:
Practical Consequences:
verify_peer, administrators may not notice the compromise unless they independently monitor for unexpected certificate changes or use external network monitoring.🛡️ Remediation & Mitigation
1. Upgrade (Primary Remediation)
Upgrade Erlang/OTP to the fixed versions:ssl module is version 11.2.12.10, 11.6.0.8, or 11.7.3 or later.2. Workarounds (If Immediate Upgrade is Not Possible)
3. Detection (IoCs)
ServerHello selects a cipher suite requiring a certificate (e.g., ECDHE-RSA-, DHE-RSA-*).
* The ServerKeyExchange message is present but no Certificate message follows it.
* The ServerKeyExchange has an empty or invalid signature field.
Wireshark to filter for tls.handshake.type == 11 (ServerKeyExchange) and verify that a tls.handshake.type == 11 (Certificate) follows for non-anonymous cipher suites.Example Wireshark Filter:
tls.handshake.type == 11 && !tls.handshake.type == 11(Note: This filter is illustrative. A more precise filter would check for the absence of Certificate messages following ServerKeyExchange for specific cipher suites.)
⚠️ Urgency
Priority: CRITICAL - Patch Immediately
[🤖 CVE Professor AI Security Engine]