/

CVE-2026-93302

Severity:

HIGH RISK

(8.2)

Certificate Authentication Bypass (CWE-295) in wolfSSL

CVE-2026-93302

Analyzed

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

TLS/DTLS Authentication Bypass and Peer Impersonation

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A wolfSSL verification flaw ignores the public key associated with a trusted peer certificate, allowing a forged certificate authority clone to pass authentication. When affected trust-peer APIs and build configurations are used, a malicious TLS or DTLS peer that knows the client's accepted certificate authorities may impersonate a trusted endpoint.

Affected context

The issue can occur in wolfSSL builds that enable WOLFSSL_TRUST_PEER_CERT and load CA certificates through wolfSSL_CTX_trust_peer_cert() or wolfSSL_trust_peer_cert(). Builds that also enable OPENSSL_COMPATIBLE_DEFAULTS may expose the behavior across broader CA loading paths. Risk is higher when a peer can determine which certificate authorities are trusted and the application relies on TLS or DTLS peer authentication, including mutual authentication.

Exploit preconditions

  • Attack surface: TLS or DTLS certificate verification - Required access: No local access is necessarily required; the attacker

must generally be able to act as or influence a network peer

  • Trigger point: Verification of a certificate associated with a configured

trusted peer or CA

  • Knowledge requirement: The attacker must know which CA certificates the

target accepts or has loaded

  • Why exploitation is possible: The verification path does not correctly

bind trust to the expected public key, allowing a forged CA clone to be

treated as trusted

Why this happens

The verification logic associated with MatchTrustedPeer fails to use the expected public key when deciding whether a certificate matches a trusted peer. This creates an improper certificate validation condition: possession of a certificate signed or structured to resemble an accepted trust anchor can be sufficient even when its public key is not the one that should be trusted. The behavior maps to CWE-295, Improper Certificate Validation, because identity and trust decisions are not completely bound to the authenticated key material.

Potential impact

  • A malicious TLS or DTLS server may bypass client-side authentication
  • An attacker could impersonate a trusted service
  • Mutual TLS authentication may be weakened in either direction
  • Sensitive application data could be disclosed or modified
  • An attacker may gain access to services that rely on certificate identity

General mitigation guidance

Mitigation generally focuses on ensuring that certificate validation binds the authenticated identity to the intended public key and trust anchor. Secure-by-default patterns include using a verification path that performs explicit public-key and certificate-chain checks, avoiding trust-peer APIs when their semantics do not match the application's authentication model, and disabling compatibility behavior that broadens legacy CA-loading paths where it is not required. CA stores should be treated as protected security policy, and applications should minimize which authorities they trust. Least-privilege process permissions and restricted configuration access can reduce the impact of trust-store tampering. Applying the vendor-provided security correction or equivalent source-level fix is also appropriate.

How teams detect issues like this

Detection can include static analysis and code review for trust decisions that compare certificate metadata without verifying the associated public key, as well as searches for uses of trusted-peer APIs under compatibility macros. Test suites should exercise forged certificates that resemble accepted CA identities but use different keys, including one-way and mutual TLS scenarios. Policy enforcement can require explicit certificate-chain, hostname, identity, and public-key validation, while runtime telemetry can record unexpected trust-anchor changes and authentication failures. Automated security review tools may help identify incomplete certificate validation patterns.

Sources

SourceLink
github.comgithub.com/wolfSSL/wolfssl/commit/22bcd51d553eaac1de37bee91fdac80cc47961e1

Frequently asked

questions

It can be, when an attacker can connect as a TLS or DTLS peer and knows which

certificate authorities the target accepts. Exploitability depends on the

affected build configuration and the application's trust-store behavior.

Not necessarily. The key prerequisite is knowledge of the accepted CA

certificates and an exposed TLS or DTLS authentication flow that uses the

affected verification behavior.

Use certificate verification that explicitly binds the trusted identity to

the expected public key and certificate chain. Avoid compatibility or

trusted-peer loading paths that do not provide the required guarantees.

Keep trust stores tightly controlled, test both unilateral and mutual

authentication with certificates using unexpected keys, and enforce review

policies requiring complete chain, identity, and public-key validation.

Find out what's already
exploitable in your codebase.