Am I affected?

type your erlang.org/otp version to check

Description

The Erlang/OTP ssl TLS 1.2 (and earlier) and DTLS client does not verify that the cipher suite selected by the server in ServerHello was among the suites offered by the client in ClientHello. The client-side tls_handshake:hello/5 handler validates the negotiated protocol version and the downgrade sentinel but hands the server-chosen suite directly to ssl_handshake:handle_server_hello_extensions/9, which installs it without a membership check. The TLS 1.3 client path performs this check (per RFC 8446), so it is not affected.

An on-path attacker between the client and the intended server can respond with a ServerHello selecting an anonymous key exchange suite such as TLS_DH_anon_* or TLS_ECDH_anon_* that the client never offered. Anonymous suites do not require the server to present a certificate, so the entire verify_peer and cacerts configuration is bypassed: the attacker completes the handshake with its own ephemeral parameters, no certificate is validated, no hostname is checked, and ssl:connect returns {ok, Socket}. All subsequent application traffic is readable and modifiable by the attacker.

This issue affects OTP from OTP R13B03 before OTP 27.3.4.15, from OTP 28.0 before OTP 28.5.0.4, and from OTP 29.0 before OTP 29.0.4, corresponding to ssl from 3.10.7 before 11.2.12.11, from 11.3 before 11.6.0.4, and from 11.7 before 11.7.4. Whether OTP before OTP R13B03, corresponding to ssl before 3.10.7, is affected is unknown.

Weaknesses & attack patterns

Weakness

CWE-757 · Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade') in catalog → MITRE ↗

Attack patterns

CAPEC-94 · Adversary in the Middle (AiTM) MITRE ↗

Affected — Erlang

< R13B03 status unknown
R13B03 < 27.3.4.15 affected
maint-28 28.0 < 28.5.0.4 affected
maint-29 29.0 < 29.0.4 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules tls_handshake · ssl_handshake · ssl
source files lib/ssl/src/tls_handshake.erl · lib/ssl/src/ssl_handshake.erl · lib/ssl/src/ssl.erl
routines tls_handshake:hello/5 · ssl_handshake:handle_server_hello_extensions/9 · ssl:connect/2 · ssl:connect/3 · ssl:connect/4

Affected — Erlang / ssl Repository ↗

< 3.10.7 status unknown
3.10.7 < 11.2.12.11 affected
11.3 < 11.6.0.4 affected
11.7 < 11.7.4 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules tls_handshake · ssl_handshake · ssl
source files src/tls_handshake.erl · src/ssl_handshake.erl · src/ssl.erl
routines tls_handshake:hello/5 · ssl_handshake:handle_server_hello_extensions/9 · ssl:connect/2 · ssl:connect/3 · ssl:connect/4

Affected — GitHub / erlang/otp Repository ↗

84adefa and up affected
064e236 not affected
0a82596 not affected
e6ff938 not affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
modules · source files · routines
modules tls_handshake · ssl_handshake · ssl
source files lib/ssl/src/tls_handshake.erl · lib/ssl/src/ssl_handshake.erl · lib/ssl/src/ssl.erl
routines tls_handshake:hello/5 · ssl_handshake:handle_server_hello_extensions/9 · ssl:connect/2 · ssl:connect/3 · ssl:connect/4

Workarounds

  • Restrict client connections to TLS 1.3 only by setting versions to ['tlsv1.3'] in the client's ssl options. The TLS 1.3 client path performs the required cipher suite membership check and is not affected.

Configurations

The vulnerability only affects TLS clients using TLS 1.2 (or earlier) or DTLS. TLS 1.3 client connections perform the cipher suite membership check and are not affected. Servers are not affected. Exploitation additionally requires an on-path (adversary-in-the-middle) attacker between the client and the intended server.

References

Credits

Jonatan Männchen / EEF Finder
Ingela Anderton Andin Remediation developer
Jakub Witczak Remediation reviewer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
« All CVEs