AI analysis
wolfSSL 5.7.2 through 5.9.2 has a client-side certificate-validation flaw in its RFC 6961 multiple OCSP response stapling implementation (CWE-295). When a client is built with HAVE_CERTIFICATE_STATUS_REQUEST_V2 and calls wolfSSL_UseOCSPStaplingV2 with WOLFSSL_CSR2_OCSP_MULTI, it treats any certificate in the peer chain as a certificate authority without checking that the certificate is authorized to act as one. An attacker who holds any certificate chaining to a CA the client trusts, plus that certificate's private key, can forge certificates for arbitrary identities that the client accepts as valid. The server's end-entity certificate is also written into the persistent trust store, so later connections that reuse the same context can be affected even if OCSP multi-stapling is not used. It was found by wolfSSL's own testing; it is not on the CISA KEV list and no public proof-of-concept is known.
What to do: Upgrade wolfSSL to a release newer than 5.9.2 as soon as a vendor fix is available; the supplied data does not name a patched version. Until then, do not call wolfSSL_UseOCSPStaplingV2 with WOLFSSL_CSR2_OCSP_MULTI, and rebuild without HAVE_CERTIFICATE_STATUS_REQUEST_V2 if OCSP multi-stapling is not required. Discard or reinitialize any SSL context that may have stored a peer end-entity certificate in its persistent trust store while the vulnerable code was in use.
Affected
| wolfSSL | 5.7.2 through 5.9.2 |
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
In wolfSSL versions 5.7.2 through 5.9.2 there is a client-side implementation flaw in RFC 6961, multiple OCSP response stapling, which can lead to certificate forgery. When a wolfSSL client enables OCSP stapling with the HAVE_CERTIFICATE_STATUS_REQUEST_V2 feature and calls wolfSSL_UseOCSPStaplingV2(ssl, WOLFSSL_CSR2_OCSP_MULTI, options), the client accepts any certificate in the peer's chain as a certificate authority without verifying that the certificate is actually authorized to act as one. This means that an attacker who possesses any certificate that chains to a CA trusted by the client (along with its private key) can forge certificates for arbitrary identities that will be accepted as valid by the client. The end entity certificate of the server is stored in the persistent trust store, affecting subsequent connections that reuse the context even when OCSP multi usage is not employed. Found by internal wolfSSL testing.