{"affected":[{"ranges":[{"events":[{"introduced":"938a5246a52d30897b4f47439352da4425ea6fc5"},{"fixed":"74782afedd9090bad0ab1dede237a2389e94743f"},{"fixed":"d9a931963d3d49c7f73ea509221c9c66737977c7"}],"repo":"https://github.com/erlang/otp","type":"GIT"}]}],"aliases":["GHSA-7mff-v332-665j","CVE-2026-124286"],"credits":[{"name":"Phillip Calvin","type":"FINDER"},{"name":"Phillip Calvin","type":"REPORTER"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"},{"name":"Ingela Anderton Andin","type":"REMEDIATION_DEVELOPER"}],"database_specific":{"capec_ids":["CAPEC-475"],"cpe_ids":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-347"]},"details":"## Summary\n\nImproper 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.\n\nWhen 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.\n\nThis 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.\n\n## Details\n\n**1. Signature decoding.** `ssl_handshake:decode_server_key/3` splits the `ServerKeyExchange` body into the key exchange parameters and a signature. The internal `dec_server_key_signature/3` maps an empty remainder, a zero-length signature, and the TLS 1.2 `anonymous` signature algorithm with an empty signature to the signature algorithm `anon`. It does this for every key exchange algorithm, not only for the anonymous ones.\n\n**2. Signature verification.** In the `certify` state the client calls `ssl_handshake:verify_server_key/5` for the non-anonymous key exchanges. No `Certificate` message arrived, so the stored public key is `undefined`. `ssl_handshake:verify_signature/5` has a clause that returns `true` for the `anon` signature algorithm with any key, and that clause matches.\n\n**3. Handshake completion.** The client does not check that it received a certificate before it handles `ServerHelloDone`. It derives the master secret from the unauthenticated (EC)DH parameters and sends `ClientKeyExchange`, `ChangeCipherSpec` and `Finished`. The attacker holds the (EC)DH private key and completes the handshake. `ssl:connect/3` returns `{ok, Socket}`, and `ssl:peercert/1` returns `{error, no_peercert}` on that socket.\n\n## Proof of concept\n\n1. Start a TCP server that answers a TLS 1.2 `ClientHello` with a `ServerHello` that selects an offered `ECDHE_RSA` suite (for example `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`), then a `ServerKeyExchange` with x25519 parameters and no signature, then `ServerHelloDone`. Send no `Certificate` message. The `UnauthenticatedECDH` test of the BoringSSL test runner (BoGo) provides such a server.\n2. Connect with `ssl:connect/3` and the options `{verify, verify_peer}`, `{cacerts, public_key:cacerts_get()}`, `{server_name_indication, \"www.example.com\"}` and `{customize_hostname_check, [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]}`.\n3. On the server, derive the session keys from its own ECDH key pair and the client's `ClientKeyExchange`, then send `ChangeCipherSpec` and `Finished`.\n4. `ssl:connect/3` returns `{ok, Socket}`, and the server decrypts the application data that the client sends. A fixed client aborts with a fatal alert after step 1.\n\n## Impact\n\nAn on-path attacker can impersonate any server to an affected client, then read and modify all application data on the connection. Certificate path validation, `verify_fun` and the hostname check do not run.\n\n## Workarounds\n\nRestrict TLS client connections to TLS 1.3 by setting `versions` to `['tlsv1.3']` in the client's `ssl` options.\n\nIf a client must use TLS 1.2, offer only the static RSA key exchange cipher suites. These suites have no `ServerKeyExchange` message. They provide no forward secrecy, and many servers do not accept them.\n\n```erlang\nRsaOnly = ssl:filter_cipher_suites(\n    ssl:cipher_suites(all, 'tlsv1.2'),\n    [{key_exchange, fun(rsa) -> true; (_) -> false end}]\n),\nOpts = [\n    {verify, verify_peer},\n    {cacerts, public_key:cacerts_get()},\n    {versions, ['tlsv1.2']},\n    {ciphers, RsaOnly},\n    {server_name_indication, \"www.example.com\"},\n    {customize_hostname_check, [\n        {match_fun, public_key:pkix_verify_hostname_match_fun(https)}\n    ]}\n].\n```\n\n## Configurations\n\nThe vulnerability affects clients whose connection can use TLS 1.2 or DTLS 1.2. The default `ssl:connect` options allow TLS 1.2. Clients restricted to TLS 1.3 are not affected. Cipher suites that do not use a `ServerKeyExchange` message (the `rsa`, `ecdh_rsa` and `ecdh_ecdsa` key exchanges) are not affected. Servers are not affected. Exploitation requires an on-path (adversary-in-the-middle) attacker between the client and the intended server.","id":"EEF-CVE-2026-124286","modified":"2026-11-24T15:12:03.371608Z","published":"2026-11-24T15:12:02.452Z","references":[{"type":"ADVISORY","url":"https://github.com/erlang/otp/security/advisories/GHSA-7mff-v332-665j"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-124286.html"},{"type":"WEB","url":"https://www.erlang.org/doc/system/versions.html#order-of-versions"},{"type":"WEB","url":"https://github.com/erlang/otp/commit/938a5246a52d30897b4f47439352da4425ea6fc5"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/74782afedd9090bad0ab1dede237a2389e94743f"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/d9a931963d3d49c7f73ea509221c9c66737977c7"}],"related":[],"schema_version":"1.8.0","severity":[{"score":"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","source":"CNA","type":"CVSS_V4"}],"summary":"TLS 1.2 Client Completes Handshake Without a Server Certificate","upstream":[]}