Netty: Missing CertificateID Validation in OCSP Response Allows Replay Attacks
A critical vulnerability (CVE-2026-56820) in Netty's `OcspClient` allows a bad actor to bypass certificate revocation checks by replaying a valid OCSP 'GOOD' status response from an unrelated certificate, enabling a certificate validation bypass for any certificate issued by the same Certificate Authority.
What's new
- l1 merged source coverage: Netty OCSP Server Certificate Validator TOCTOU Vulnerability Allows Data Leakage Jul 22, 21:50 via ghsa
A significant vulnerability, identified as CVE-2026-56820, exists within Netty's OcspClient, specifically in the io.netty.handler.ssl.ocsp.OcspClient#validateResponse method. This flaw stems from a failure to validate that the CertificateID contained within an OCSP response matches the CertificateID of the certificate being requested for validation. This oversight allows an attacker to perform replay attacks: by obtaining a legitimate OCSP "GOOD" status response for any non-revoked certificate issued by a common Certificate Authority (CA), the attacker can then replay this response to a Netty client checking the status of a different certificate. Because the client verifies the response's signature (which is valid as it comes from the CA) but neglects the CertificateID mismatch, it will erroneously accept a potentially revoked or invalid certificate as legitimate. This vulnerability impacts any application using affected Netty versions for OCSP revocation checks, specifically netty-handler-ssl-ocsp in versions from 4.2.0.Final up to 4.2.16.Final (exclusive) and versions prior to 4.1.136.Final.
Attack Chain
- Identify Target Netty Client: An attacker identifies an application that uses Netty's
OcspClientfor certificate revocation checks, making it susceptible to validation bypass. - Obtain Valid Certificate: The attacker procures a valid, non-revoked certificate that was issued by the same Certificate Authority (CA) as the target certificate intended for bypass.
- Request Legitimate OCSP Response: The attacker sends a standard OCSP request for this unrelated, valid certificate to the CA's OCSP responder.
- Capture "GOOD" Status Response: The attacker intercepts and captures the legitimately signed OCSP response, which confirms the "GOOD" status of the unrelated certificate.
- Intercept Target OCSP Query: When the Netty client attempts to validate the target certificate (which may be revoked or otherwise invalid), the attacker intercepts its outbound OCSP status query.
- Replay Captured Response: The attacker replies to the Netty client's query by replaying the previously captured "GOOD" status OCSP response (from step 4).
- Bypass Revocation Check: Due to the vulnerability (CVE-2026-56820), the Netty client accepts the replayed response as valid, failing to detect the
CertificateIDmismatch, and incorrectly validating the target certificate as non-revoked. - Compromise TLS Security: The application proceeds with the connection, unknowingly accepting a potentially revoked or invalid certificate, thereby undermining the security and integrity of TLS/SSL communication.
Impact
This vulnerability leads to a critical certificate validation bypass, potentially allowing applications using Netty's OcspClient to trust revoked or otherwise illegitimate certificates. If exploited, the integrity and authenticity guarantees provided by TLS/SSL can be severely undermined, enabling attackers to impersonate legitimate services or users. Any application that relies on Netty for secure communication, particularly those with OCSP validation enabled, is at risk of accepting fraudulent certificates, which could lead to unauthorized access, data interception, or other forms of compromise without the client detecting the certificate's invalid status.
Recommendation
- Patch CVE-2026-56820 on all affected Netty
netty-handler-ssl-ocspcomponents immediately. - Upgrade the
io.netty:netty-handler-ssl-ocsplibrary to version4.2.16.Finalor newer, or to4.1.136.Finalor newer, as described in the reference GHSA-272m-gcwp-mpwg.