Erlang/OTP TLS Client Impersonation (CVE-2026-124286)
Erlang/OTP TLS 1.2 clients with verify_peer accept an unsigned anonymous key exchange, letting an on-path attacker impersonate servers; fixed in 29.0.3.
TL;DR
- An Erlang/OTP TLS 1.2 client with
verify_peeraccepts an unsigned anonymous key exchange, so it completes a handshake with a server that presents no certificate. An on-path attacker can impersonate any TLS server to that client. - Erlang/OTP 17.0 and later are affected, including the ssl application from 5.3.4. The fixed releases are OTP 29.0.3, 28.5.0.9 and 27.3.4.14.
- The Erlang/OTP project rates it Critical, CVSS v4.0 9.1. No exploitation is known and no public proof of concept exists; CVE-2026-124286 is not in CISA KEV as of 2026-11-30.
- Upgrade to a fixed OTP release. If you cannot, force TLS 1.3, which is unaffected, or restrict a TLS 1.2 client to static RSA suites as a last resort; see "How do I fix it?".
Am I affected?
A client is exposed when it runs an affected Erlang/OTP release, uses TLS 1.2, and is configured to authenticate the server. All of these conditions must hold:
- The client runs Erlang/OTP 17.0 or later with an ssl application at 5.3.4 or later.
- The client offers TLS 1.2 and a key exchange that uses a ServerKeyExchange message, such as ECDHE. The advisory says the default client configuration meets this.
- The attacker can sit on the network path between the client and the server, for example on a shared network, a compromised router or a TLS-terminating middlebox they control.
A client that only uses TLS 1.3 is not affected. So is a client that only offers cipher suites without a ServerKeyExchange, such as static RSA key transport, ECDH_RSA or ECDH_ECDSA. Servers are not affected.
| Branch | Affected versions | Fixed version |
|---|---|---|
| OTP 29 | 29.0 to 29.0.2 | 29.0.3 |
| OTP 28 | 28.0 to 28.5.0.8 | 28.5.0.9 |
| OTP 27 | 27.0 to 27.3.4.13 | 27.3.4.14 |
Read the OTP release and the ssl application version:
erl -noshell -eval 'io:format("OTP ~s~n", [erlang:system_info(otp_release)]), halt().'
erl -noshell -eval 'application:ensure_all_started(ssl), io:format("ssl ~p~n", [application:get_key(ssl, vsn)]), halt().'
The OTP release is the first number, for example 28. The ssl application version maps to the OTP release but is printed separately because some deployments upgrade the application alone. Compare both with the table and the advisory's ssl versions: 11.7.3, 11.6.0.8 and 11.2.12.10 are the fixed application versions.
The Erlang/OTP project does not list versions before OTP 17.0, which introduced its current version scheme and has been unsupported for years.
For a container, run the same commands inside it:
docker exec <container> erl -noshell -eval 'io:format("OTP ~s~n", [erlang:system_info(otp_release)]), halt().'
How do I fix it?
Upgrade to OTP 29.0.3, 28.5.0.9 or 27.3.4.14. Choose the release on the branch you already run, and rebuild the application against it.
- Install the fixed OTP build with your usual tool:
bash asdf install erlang 29.0.3 asdf global erlang 29.0.3On Debian or Ubuntu, install the distribution'serlangpackage if it carries the fixed version, or build from the official source. Homebrew users can runbrew upgrade erlang. Verify the result with the two commands in "Am I affected?". - Rebuild and redeploy every client that links the ssl application. An OTP upgrade does not change a running release until the release is rebuilt and restarted.
- For a container image, rebuild it from the fixed OTP base and recreate the container. Pulling a new image is not enough if the running container still uses the old one.
If you cannot upgrade yet, the advisory gives two workarounds. Force TLS 1.3, which is not affected:
[{verify, verify_peer},
{cacerts, public_key:cacerts_get()},
{versions, ['tlsv1.3']},
{server_name_indication, "www.example.com"}]
That works only when every server the client talks to accepts TLS 1.3. For a client that must keep TLS 1.2, the advisory describes a last resort that offers only static RSA key transport suites, which have no ServerKeyExchange. Static RSA provides no forward secrecy, and many servers no longer accept it, so the handshake may fail. Prefer a patched release.
What is the root cause?
The TLS 1.2 client treated an anonymous key exchange as a verified one. A server that sent no certificate and an unsigned ServerKeyExchange still passed the verify_peer check. Two clauses in ssl_handshake.erl produced that result in OTP 28.5.0.8.
The first clause made signature verification return true whenever the negotiated hash and signature algorithm was anon:
verify_signature(Version, _Msg, {_HashAlgo, anon}, _Signature, _)
when ?TLS_1_X(Version), ?TLS_LTE(Version, ?TLS_1_2) ->
true;
The second clause decoded an explicit zero-length signature field as an anonymous key exchange, regardless of the negotiated version:
dec_server_key_signature(Params, <<>>, _) ->
{Params, {null, anon}, <<>>};
dec_server_key_signature(Params, <<?UINT16(0)>>, _) ->
{Params, {null, anon}, <<>>};
A malicious server sends no Certificate message and a ServerKeyExchange whose signature field is a two-byte zero length. The decoder maps that to {null, anon}, and verify_signature returns true for it under TLS 1.2. The client completes the handshake even though it was configured with verify_peer and a CA bundle.
How is it exploited?
The attacker must be on the network path. They do not need a certificate for the target name, and they do not need the client to trust a rogue CA.
- The client opens a TLS 1.2 connection and offers ECDHE cipher suites, as the default configuration does.
- The on-path attacker answers with a ServerHello for an authenticated ECDHE suite but sends no Certificate message.
- The attacker sends a ServerKeyExchange with a zero-length signature field, which the client decodes as
{null, anon}. verify_signaturereturnstruefor the anonymous algorithm, so the client accepts the key exchange without a certificate.- The handshake completes. The attacker holds the session keys and can read and modify the traffic in both directions.
The advisory does not publish a proof-of-concept script. It describes the message sequence and the affected configurations, and the fix commit shows the exact code path.
How does the attack flow?
An on-path attacker presents an anonymous key exchange as an authenticated TLS 1.2 suite, and the client's signature check accepts it without a server certificate.
What can an attacker do?
An on-path attacker can impersonate any TLS server to an affected client. They can read and modify all traffic on that connection, even when the client is configured for full server authentication. The advisory states this outcome directly.
The conditions are the ones in "Am I affected?". The attacker needs an affected OTP release, a client that offers TLS 1.2 with a ServerKeyExchange key exchange, and an on-path position. The attacker chooses the cipher suite, so the key type in the real server's certificate does not constrain them. TLS 1.3 connections, clients restricted to cipher suites without a ServerKeyExchange, and servers are not affected.
This is an interception flaw, not a remote code execution flaw. The attacker gains confidentiality and integrity over one connection. They do not gain code execution on the client or the server from this bug alone.
Why does the fix work?
The fix removes the clause that returned true for an anonymous signature and stops decoding an explicit zero-length signature field as anonymous. The change is small and precise:
verify_signature(_, Msg, {HashAlgo, _SignAlg}, Signature,
{?'id-ecPublicKey', PublicKey, PublicKeyParams}) ->
public_key:verify(Msg, HashAlgo, Signature, {PublicKey, PublicKeyParams});
-verify_signature(Version, _Msg, {_HashAlgo, anon}, _Signature, _)
- when ?TLS_1_X(Version), ?TLS_LTE(Version, ?TLS_1_2) ->
- true;
verify_signature(Version, Msg, {HashAlgo, dsa}, Signature, {?'id-dsa', PublicKey, PublicKeyParams})
when ?TLS_1_X(Version), ?TLS_LTE(Version, ?TLS_1_2) ->
public_key:verify(Msg, HashAlgo, Signature, {PublicKey, PublicKeyParams}).
@@
-dec_server_key_signature(Params, <<>>, _) ->
- {Params, {null, anon}, <<>>};
-dec_server_key_signature(Params, <<?UINT16(0)>>, _) ->
+dec_server_key_signature(Params, <<>>, Version) when ?TLS_LTE(Version, ?TLS_1_2) ->
{Params, {null, anon}, <<>>};
After the patch, an anonymous hash or signature algorithm no longer has a verify_signature clause that returns true. A two-byte zero-length signature field no longer decodes as anonymous; only a wholly absent signature does, and only for TLS 1.2 or earlier. The client therefore rejects the handshake the attack depends on.
The commit message says this is a backport to the OTP 28 maintenance branch of hardening that had already reached OTP 27 and OTP 29 for a different scenario. The gap on OTP 28 is why the advisory lists three fixed branches.
How do I check if I was compromised?
An on-path TLS interception is hard to see from the client after the fact. The advisory publishes no indicators of compromise, and a successful interception can leave only a completed TLS 1.2 session in the application log.
Look for TLS 1.2 sessions to endpoints that support TLS 1.3, especially from clients that should have negotiated TLS 1.3. Check the server certificate your client recorded, if your application logs it, against the certificate the real server presents:
grep -Ei "tlsv1.2|tls 1.2|peer_certificate" /var/log/<application>.log
If your client or proxy logs the negotiated protocol, a TLS 1.2 session to a TLS 1.3 capable endpoint is a lead, not proof. Ask the server side for its TLS session records and compare the certificate fingerprints. An attempt that failed at the handshake may leave no client-side trace.
Timeline
- 2026-11-13: The fix commit 74782af is authored for the OTP 28 maintenance branch.
- 2026-11-24: The Erlang/OTP project publishes advisory GHSA-7mff-v332-665j and CVE-2026-124286.
FAQ
Does this affect TLS 1.3?
No. The advisory states that TLS 1.3 connections are not affected. The vulnerable code path is the TLS 1.2 ServerKeyExchange handling.
Am I affected if my client uses a certificate pin?
The advisory does not describe a pinning interaction. Its reproduction assumes verify_peer with a CA bundle. If your client also pins the server certificate or public key outside the ssl application, test that control against a malicious server before relying on it.
Why does the attacker need to be on the network path?
The flaw lets a server skip the certificate, but the attacker must be the server the client reaches. That requires intercepting or redirecting the connection, which is an on-path position, not a request an unauthenticated attacker sends to an exposed service.
Are servers affected?
No. The advisory states that servers are not affected. The bug is in the client's handling of the server's key exchange.
Is there a public exploit?
No public proof-of-concept script is published. The advisory describes the message sequence, and the fix commit shows the code path, but no exploit code is linked.
Which ssl application version does each OTP release ship?
The advisory lists ssl 11.7.3, 11.6.0.8 and 11.2.12.10 as the fixed application versions. It also lists OTP 29.0.3, 28.5.0.9 and 27.3.4.14. If you upgrade only the ssl application, match the fixed application version. If you upgrade OTP, the bundled ssl application follows.
Inventory the Erlang and Elixir runtimes you ship with Ostorlab
Ostorlab's software composition analysis inventories the runtimes and open-source dependencies your teams build and ship. It shows which services still carry an affected Erlang/OTP release. Use it to find the clients that need a rebuild before you rely on TLS for interception resistance.
References
- Erlang/OTP security advisory GHSA-7mff-v332-665j, "TLS 1.2 Client Completes Handshake Without a Server Certificate" (checked November 30, 2026): https://github.com/erlang/otp/security/advisories/GHSA-7mff-v332-665j
- Erlang/OTP fix commit 74782af, "ssl: Make anonymous handling stricter" (checked November 30, 2026): https://github.com/erlang/otp/commit/74782afedd9090bad0ab1dede237a2389e94743f
- Erlang/OTP 28.5.0.8 affected source,
lib/ssl/src/ssl_handshake.erl(checked November 30, 2026): https://github.com/erlang/otp/blob/OTP-28.5.0.8/lib/ssl/src/ssl_handshake.erl - Erlang/OTP 28.5.0.9 fixed source,
lib/ssl/src/ssl_handshake.erl(checked November 30, 2026): https://github.com/erlang/otp/blob/OTP-28.5.0.9/lib/ssl/src/ssl_handshake.erl - CVE-2026-124286 record (checked November 30, 2026): https://www.cve.org/CVERecord?id=CVE-2026-124286
Keep reading
