wolfSSL — Leaf-Only Revocation Fallback with Discarded Failure When TLS 1.2 CertificateStatus Is Missing
When a TLS 1.2 server omits the CertificateStatus message, the wolfSSL client runs a fallback OCSP lookup for the leaf certificate only and returns its failure only if OCSP or must-staple is enabled on the certificate manager. A client that requires CRL checking, has OCSP disabled and still requests stapling completes the handshake with no revocation check on the leaf.
- Advisory
- BYTERAY-2026-0445
- CWE
- CWE-370
- Vendor
- wolfSSL
- Product
- wolfSSL
- Reported
- 2026-09-28
- Disclosure
- 2026-12-03
- Affected
- wolfSSL 5.9.2 (tested at master commit d95483f), TLS 1.2 clients that request OCSP stapling v2 with CRL checking enabled and certificate-manager OCSP disabled
- Credit
- Mehrun P. Hunter and Shahriyar Jalayeri, ByteRay Ltd.
Executive Summary
A wolfSSL TLS 1.2 client that requests OCSP stapling expects a CertificateStatus message with revocation proof for the server's certificate. If the server sends ServerHelloDone without it, the client runs a fallback: it tries to look up the revocation status itself.
The fallback has two limits. It covers only the leaf certificate, never a CA certificate in the chain. And its failure is returned only when the certificate manager has OCSP enabled or must-staple set. With OCSP disabled the fallback lookup cannot run. It reports a lookup failure, the failure is dropped, and the handshake continues.
The leaf's CRL check was already skipped earlier because stapling was requested. In a client that requires CRL checking for the whole chain, has OCSP disabled and still requests stapling v2, a server that withholds CertificateStatus has its leaf certificate accepted with no revocation check, including a revoked one. CA certificates in the chain are still CRL-checked in this configuration. The configuration is unusual and is not a default build.
Affected Products and Versions
- Component:
src/internal.c, theserver_hello_donecase ofSanityCheckMsgReceived(), called fromDoHandShakeMsgType(); andsrc/tls.c,TLSX_CSR2_ForceRequest(). - Required build: client side with TLS 1.2,
HAVE_CERTIFICATE_STATUS_REQUEST_V2andHAVE_CRL. - Tested: wolfSSL master d95483fff72d6e987394b72edca433d4b580a0f4 (version string 5.9.2).
- A default
./configurebuild has neither CRL support nor OCSP stapling v2 and is not affected. - Other releases were not checked.
Technical Details
The fallback runs when no CertificateStatus was received (src/internal.c:20349). The result of the forced lookup is returned only under a condition (src/internal.c:20373-20378):
if (csrRet != 0) {
/* Error out if OCSP lookups are enabled and failed or if
* the user requires stapling. */
if (SSL_CM(ssl)->ocspEnabled || SSL_CM(ssl)->ocspMustStaple)
return csrRet;
}
- The client called
wolfSSL_UseOCSPStaplingV2(), sossl->status_request_v2is set. While the Certificate message is processed, the leaf's own revocation lookup is switched off (doLookup = 0,src/internal.c:17546-17551). The leaf CRL check depends on that variable (src/internal.c:17588-17590). - The server sends ServerHelloDone without CertificateStatus.
DoHandShakeMsgType()callsSanityCheckMsgReceived()(src/internal.c:20697), which reaches theserver_hello_donecase (src/internal.c:20299). - The case calls
TLSX_CSR2_ForceRequest()(src/internal.c:20358-20361). - That function forces only the first request, the leaf (
src/tls.c:4575,src/tls.c:4582-4586). When OCSP is not enabled on the certificate manager it returnsOCSP_LOOKUP_FAIL(src/tls.c:4595-4598). - On a non-zero result the pending CA list is cleared (
src/internal.c:20368-20370). The error itself is returned only whenocspEnabledorocspMustStapleis set. With both clear it is dropped. - The handshake completes. The leaf has had neither a CRL check nor an OCSP check.
No fallback lookup is attempted for the chain certificates registered for stapling (src/internal.c:18638-18647). When OCSP is enabled, the condition above does return the failure, so the leaf is enforced in that configuration. With OCSP disabled, the deferred-staple waiver for chain CAs (src/internal.c:18749-18754) does not apply, because it requires ocspEnabled. Chain CAs therefore stay CRL-checked, and the gap is limited to the leaf.
Reachability and Preconditions
- The victim is a wolfSSL TLS 1.2 client with CRL checking enabled for the chain (
WOLFSSL_CRL_CHECKALL), OCSP not enabled on the certificate manager, must-staple not set, and stapling v2 requested withwolfSSL_UseOCSPStaplingV2(). - The attacker is the TLS server, or an on-path party able to remove the CertificateStatus message from a TLS 1.2 handshake.
- The attacker's chain must still pass the CRL checks on its CA certificates.
- No client authentication or user interaction is needed. The attack consists of not sending one message.
Impact
A revoked leaf certificate is accepted with no revocation verification. Only the leaf's revocation state can be abused. The configuration that exposes this is rare and internally inconsistent: CRL checking is required, OCSP is disabled, and stapling is requested anyway.
ByteRay did not build a proof of concept for this issue. The analysis is from source review.
Remediation and Mitigation
ByteRay has not confirmed a fixed wolfSSL release for this issue as of 2026-12-03, and has not checked it against wolfSSL changes made after the tested commit.
The fix direction is to fail closed: return the fallback's error whenever the client requested stapling or CRL checking is configured, not only when OCSP is enabled. The fallback should also cover every registered request, or require a response for each pending CA. An alternative is to stop suppressing the leaf CRL lookup unless a CertificateStatus message was received or the fallback can run. Configurations that cannot be honored could be rejected when they are set. Workarounds: on a client that relies on CRLs, do not request OCSP stapling v2, so the leaf CRL check runs. Or enable OCSP on the certificate manager, or set must-staple, so the fallback failure ends the handshake.
Timeline
- 2026-09-28 — Reported to wolfSSL.
- 2026-12-03 — Public disclosure.
Credits
Discovered and reported by Mehrun P. Hunter and Shahriyar Jalayeri of ByteRay Ltd.
References
- Missing-CertificateStatus fallback at the tested commit
TLSX_CSR2_ForceRequestat the tested commit- BYTERAY-2026-0370, chain CA CRL failures discarded when OCSP stapling is requested
- BYTERAY-2026-0369, leaf certificate revocation checks skipped for OCSP stapling clients
- BYTERAY-2026-0368, missing stapled OCSP enforcement for chain CAs in CertificateStatus handling