JLSEC-2026-2373: Without NO_SESSION_CACHE_REF, wolfSSL_get_session() does not return a session object but a...
Without NOSESSIONCACHEREF, wolfSSLgetsession() 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 WOLFSSLCTX. Resuming through the handle then produces an abbreviated handshake in which no Certificate message is sent, so neither chain verification nor wolfSSLcheckdomainname() runs, and the attacker is accepted as the original server for the whole of that connection. Affected builds are those leaving NOSESSIONCACHEREF, NOSESSIONCACHE, NOCLIENTCACHE and TITANSESSIONCACHE all undefined, which includes a plain ./configure, --enable-opensslextra and --enable-opensslall; fifteen integration options define NOSESSIONCACHEREF 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 OPENSSLCOMPATIBLEDEFAULTS family, and --enable-leanpsk, --enable-leantls, --enable-lowresource and --enable-tinytls13 disable the cache outright. The application must use the legacy reference flow, wolfSSLgetsession() or SSLgetsession() followed by wolfSSLsetsession(); wolfSSLget1session() returns the session object itself and is not affected, nor are wolfSSLSetServerID() 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 WOLFSSLCTX 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 WOLFSSLCACHEVERSION from 2 to 3, so a cache persisted by an older build is rejected by a fixed one.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Build with a configuration that defines NO_SESSION_CACHE_REF, such as --enable-all.
wolfSSL NO_SESSION_CACHE_REF = defined - Compensating control
Use wolfSSL_get1_session() instead of the wolfSSL_get_session()/SSL_get_session() reference flow; the session-object API is not affected.
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which build configurations are affected?
Builds are affected when NO_SESSION_CACHE_REF, NO_SESSION_CACHE, NO_CLIENT_CACHE, and TITAN_SESSION_CACHE are all undefined. This includes plain ./configure builds and builds using --enable-opensslextra or --enable-opensslall.
What does an attacker need to exploit this behavior?
The attacker needs to cause a TLS 1.2 session-cache entry to be replaced using a server-chosen session ID that matches another server's session ID. The client must later resume through the retained session handle.
Will certificate or hostname verification protect a resumed connection?
No. The resumed connection uses an abbreviated handshake with no Certificate message, so chain verification and wolfSSL_check_domain_name() do not run for that connection.
What can be done if an update is not immediately available?
Avoid the affected session-cache-reference configuration by defining NO_SESSION_CACHE_REF. Configurations that define NO_SESSION_CACHE or NO_CLIENT_CACHE also do not meet the stated affected-build condition.