Summary
CVE-2026-93302 is a certificate validation flaw in wolfSSL’s MatchTrustedPeer function that ignores the public key of a loaded trusted-peer certificate when matching it against a presented certificate. This allows an attacker who knows which CA certificates a client trusts to forge a "CA clone" certificate that passes verification, letting a malicious TLS/DTLS server bypass client authentication. The issue affects wolfSSL 5.3.0 through 5.9.2 and carries a CVSS v4.0 base score of 8.3 (High).
Technical details
- Root cause:
MatchTrustedPeercompares certificates against the trusted-peer certificate store but fails to validate the public key of the matched certificate, so an attacker-crafted certificate sharing other matched attributes (e.g., subject) can be treated as trusted even though it uses a different key pair. - Trigger conditions: Exploitable in builds where the
WOLFSSL_TRUST_PEER_CERTmacro is enabled and the application loads CA certificates viawolfSSL_CTX_trust_peer_cert()orwolfSSL_trust_peer_cert(). WhenOPENSSL_COMPATIBLE_DEFAULTSis also defined, the exposure widens to affect all CA certificate loading APIs generally — a configuration present in common autoconf-based builds (e.g., nginx, HAProxy, stunnel, wpa_supplicant, Apache httpd, hitch, BIND, rsyslog, ffmpeg, and various distro packages). - Attack vector: Network — a malicious (D)TLS server that knows which CAs the connecting client trusts can present a forged certificate to bypass client-side authentication of the server, without needing to possess the actual private key or a pre-shared key (PSK) in PSK-based connections.
- Impact: High integrity impact — successful exploitation lets an attacker impersonate a trusted server/peer and bypass an authentication check that the client relies on, undermining the confidentiality and integrity guarantees of the TLS/DTLS session.
Affected software
- wolfSSL versions 5.3.0 through 5.9.2 (inclusive), when built with
WOLFSSL_TRUST_PEER_CERTenabled and usingwolfSSL_CTX_trust_peer_cert()/wolfSSL_trust_peer_cert() - Exposure widens to all CA certificate loading APIs in builds that also define
OPENSSL_COMPATIBLE_DEFAULTS(common in autoconf-based builds distributed with nginx, HAProxy, stunnel, wpa_supplicant, Apache httpd, hitch, BIND, rsyslog, ffmpeg, and various Linux distributions)
Severity
- CVSS v4.0 Base Score: 8.3 (High)
- Vector:
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: Upgrade to wolfSSL 5.9.4 or later, which contains the fix for
MatchTrustedPeer. - If patching is not immediately possible:
- Disable the
OPENSSL_COMPATIBLE_DEFAULTSbuild option (e.g., avoid--enable-openssl-compatible-defaults) to narrow the exposed API surface. - Avoid using
wolfSSL_CTX_trust_peer_cert()andwolfSSL_trust_peer_cert()for certificate loading until patched. - Review builds of downstream applications (nginx, HAProxy, stunnel, wpa_supplicant, Apache httpd, hitch, BIND, rsyslog, ffmpeg, and Linux distribution packages) that statically or dynamically link wolfSSL, and confirm whether they enable the affected macros.
- Disable the

