CVE-2026-117666 PUBLISHED

ssl_verify_fun: partial-label wildcard certificate matches hostnames across a label boundary

Assigner: EEF
Reserved: 30.10.2026 Published: 30.10.2026 Updated: 30.10.2026

Improper Validation of Certificate with Host Mismatch vulnerability in deadtrickster ssl_verify_fun allows an adversary in the middle to impersonate a TLS peer via a certificate that carries a partial-label wildcard. try_match_wildcard/4 in src/ssl_verify_hostname.erl anchors only the text before and after the * of an identifier such as f.example.net, so the wildcard also consumes dots and the certificate is accepted for f.evil.example.net. RFC 6125 confines a wildcard to the left-most label. The same matcher lets .168.1.1 match the IP literal 192.168.1.1. Whole-label wildcards are matched correctly.

Erlang/OTP 20.0 and later check the hostname in ssl before a user verify_fun sees valid_peer, so a client that keeps server_name_indication set rejects the mismatch regardless. Exposed are clients that disable SNI, servers that verify client certificate hostnames with this library, and direct callers of verify_cert_hostname/2.

This issue affects ssl_verify_fun: from 1.0.1 before 1.1.8.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
CVSS Score: 9.1

Product Status

Vendor deadtrickster
Product ssl_verify_fun
Versions Default: unaffected
  • affected from 1.0.1 to 1.1.8 (excl.)
Vendor deadtrickster
Product ssl_verify_fun
Versions Default: unaffected
  • affected from a49ca56923356c7a3981692b23c42ef32c2990e0 to ca34031299cd2e0c98794c0da4ba556b94e39aad (excl.)

Affected Configurations

ssl_verify_fun decides the outcome only where it is the sole hostname check. Erlang/OTP 20.0 and later verify the hostname in ssl before the user verify_fun is called with valid_peer, as long as server_name_indication is a hostname or the connection was upgraded from a socket. A deployment is exposed when it sets {server_name_indication, disable}, when a TLS server uses ssl_verify_hostname:verify_fun/3 to verify client certificates, when it calls ssl_verify_hostname:verify_cert_hostname/2 directly, or when it runs Erlang/OTP older than 20.0. The attacker also needs a certificate with a partial-label wildcard from a CA the client trusts, which the CA/Browser Forum Baseline Requirements do not allow, so the realistic exposure is private PKI.

Workarounds

On Erlang/OTP 21 or later, keep server_name_indication set to the target hostname and pass {customize_hostname_check, [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]} in the ssl options. The hostname check in ssl then rejects the mismatch before ssl_verify_fun runs, and legitimate wildcard certificates continue to match. hackney and tls_certificate_check already set both options.

Credits

  • Andrew Moore finder
  • Martin Karrer finder
  • Andrew Moore reporter
  • Martin Karrer remediation developer
  • deadtrickster remediation developer
  • Jonatan Männchen / EEF coordinator

References

Problem Types

  • CWE-297 Improper Validation of Certificate with Host Mismatch CWE

Impacts

  • A holder of a certificate for f*.example.net from a CA the client trusts can impersonate any host named f.<label>.example.net to a client that relies on ssl_verify_fun alone for hostname verification, and read or alter the traffic of that connection.