wolfSSL TLS 1.2 session-cache poisoning skips server auth
CVSS 4.0
2.3low
EPSS
—
Published
()
Modified
AI analysis
In wolfSSL 5.3.0 through 5.9.2, builds that leave NO_SESSION_CACHE_REF, NO_SESSION_CACHE, NO_CLIENT_CACHE, and TITAN_SESSION_CACHE undefined—including a plain ./configure and --enable-opensslextra or --enable-opensslall—have wolfSSL_get_session() and SSL_get_session() return a reference into the process-global session cache that is validated only by a hash of the session ID. An attacker who sees a TLS 1.2 or DTLS 1.2 session ID, which the server chooses and sends in the clear, can cause AddSessionToCache() to overwrite that entry with the attacker's master secret, cipher suite, and version, because the write path does not compare the peer, the application server ID, or the WOLFSSL_CTX. Resuming through wolfSSL_set_session() then uses an abbreviated handshake that sends no Certificate message, so chain verification and wolfSSL_check_domain_name() never run and the attacker is accepted as the original server for that connection. The poisoned entry crosses WOLFSSL_CTX boundaries and lasts until eviction or the default 500-second timeout; TLS 1.3, empty-session-ID ticket resumption, wolfSSL_get1_session(), server-ID lookups, and presets that define NO_SESSION_CACHE_REF or disable the cache are not affected. No public proof of concept is known and the issue is not in CISA KEV.
What to do: Upgrade to wolfSSL 5.9.4 or any release after v5.9.2; the fix adds a per-write generation counter and raises WOLFSSL_CACHE_VERSION from 2 to 3, so a cache persisted by an older build is rejected. Until then, rebuild with NO_SESSION_CACHE_REF or a preset that defines it (such as --enable-all, --enable-distro, or the curl, nginx, haproxy, stunnel, or wpas options), switch from wolfSSL_get_session() or SSL_get_session() plus wolfSSL_set_session() to wolfSSL_get1_session(), or stop using TLS 1.2 and DTLS 1.2 session-ID resumption. Check whether the binary was produced by a plain ./configure or --enable-opensslextra/--enable-opensslall and whether the application uses that legacy session-reference flow.
Affected
wolfSSL
v5.3.0 through v5.9.2 when NO_SESSION_CACHE_REF, NO_SESSION_CACHE, NO_CLIENT_CACHE, and TITAN_SESSION_CACHE are all undefined (including plain ./configure, --en
Estimated exposure
—No basis for an estimate.
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
Without NO_SESSION_CACHE_REF, wolfSSL_get_session() does not return a session object but a ClientSession reference of the form {row, index, hash(sessionID)} into the process-global SessionCache, and ClientSessionToSession() validates it against that hash alone. Because the TLS 1.2 session ID is chosen by the server and sent in clear, AddSessionToCache() matches any other server's session on the same ID and overwrites the client-side entry with that server's master secret, cipher suite and version, while the handle continues to resolve; nothing on the write path compares the peer, the application's server ID or the WOLFSSL_CTX. Resuming through the handle then produces an abbreviated handshake in which no Certificate message is sent, so neither chain verification nor wolfSSL_check_domain_name() runs, and the attacker is accepted as the original server for the whole of that connection. Affected builds are those leaving NO_SESSION_CACHE_REF, NO_SESSION_CACHE, NO_CLIENT_CACHE and TITAN_SESSION_CACHE all undefined, which includes a plain ./configure, --enable-opensslextra and --enable-opensslall; fifteen integration options define NO_SESSION_CACHE_REF and are therefore not affected, among them --enable-all, --enable-distro, --enable-curl, --enable-nginx, --enable-haproxy, --enable-stunnel, --enable-wpas and the rest of the OPENSSL_COMPATIBLE_DEFAULTS family, and --enable-leanpsk, --enable-leantls, --enable-lowresource and --enable-tinytls13 disable the cache outright. The application must use the legacy reference flow, wolfSSL_get_session() or SSL_get_session() followed by wolfSSL_set_session(); wolfSSL_get1_session() returns the session object itself and is not affected, nor are wolfSSL_SetServerID() lookups. Only TLS 1.2 and below and DTLS 1.2 and below are reachable, since TLS 1.3 and ticket resumption with an empty ServerHello session ID both use a client-chosen cache key. The poisoned entry lives in the process-global cache, so it crosses WOLFSSL_CTX boundaries and persists until the entry is evicted or the session times out, 500 seconds by default. Releases v5.3.0 through v5.9.2 are affected; the fix adds a per-write generation counter to the cache and raises WOLFSSL_CACHE_VERSION from 2 to 3, so a cache persisted by an older build is rejected by a fixed one.
wolfSSL 5.9.4 fixes 11 TLS and certificate-validation flaws, including trusted-peer and OCSP authentication bypasses.
wolfSSL 5.9.4 fixes 11 flaws in TLS and DTLS handshakes, X.509 validation, OCSP stapling, session resumption, and memory safety. CVE-2026-93302, affecting 5.3.0 through 5.9.2, can let a forged CA clone pass trusted-peer checks when WOLFSSL_TRUST_PEER_CERT is enabled. High-severity CVE-2026-89102 and CVE-2026-89136 may bypass authentication in multi-OCSP and Raw Public Key builds. Other fixes include ChangeCipherSpec ordering, NameConstraints bypasses, skipped CRL checks, session-cache poisoning, and a heap use-after-free. No exploitation is reported.
wolfSSL 5.9.4 patches 11 TLS vulnerabilities, including three high-severity certificate validation bypasses, and adds post-quantum cryptography features.
wolfSSL 5.9.4 fixes 11 CVEs (three high, four medium, four low) in its embedded TLS/cryptography library, most affecting specific build options rather than default configurations. High-severity issues include CVE-2026-93302 (trusted-peer certificate bypass via forged CA clone), CVE-2026-89102 (OCSP stapling certificate forgery), and CVE-2026-89136 (Raw Public Key authentication bypass), affecting versions from 3.15.5 through 5.9.2. The release also expands post-quantum support with native Falcon signatures, FrodoKEM, SLH-DSA for TLS 1.3, and PQ-only ML-KEM/ML-DSA configurations. wolfSSL warns that long-running applications may need full process restarts because certificate or session state can persist in memory.