Summary
A flaw in Netty's OCSP client allows a legitimately signed GOOD status for one certificate to be accepted as proof of validity for a different certificate from the same CA.
When OCSP responses are not bound to the originally requested CertificateID, an attacker can replay a valid response and bypass revocation checks for another certificate in certain TLS/PKI deployments.
Affected context
This issue affects applications that integrate Netty's OcspClient to perform Online Certificate Status Protocol (OCSP) revocation checking during TLS or other certificate-based trust decisions.
Risk is present when:
- OCSP responses are accepted from a CA without verifying that the
CertificateIDin the response matches the one originally requested - The same CA issues multiple certificates for which revocation checks are performed
- Application logic relies on OCSP responses to enforce revocation and trust decisions
Exploit preconditions
- Attack surface: Certificate validation path during TLS/PKI handshakes or OCSP-based checks.
- Required access: Ability to supply or replay an OCSP response for a certificate issued by the same CA, or to influence the OCSP responder traffic (e.g., man-in-the-middle, compromised network, or malicious responder).
- Trigger point: Invocation of
OcspClient.validateResponsewhen an OCSP response is processed to determine certificate status. - Why exploitation is possible: The implementation accepts a signed GOOD status for any certificate issued by the CA, without verifying that the
CertificateIDin the response matches the specific certificate for which the status was requested, enabling replay of unrelated but valid responses.
Why this happens
The underlying bug stems from incomplete validation of OCSP responses in Netty's OcspClient.
Correct OCSP processing requires verifying that the CertificateID in the responder's reply exactly matches the CertificateID that was requested for the target certificate.
By only checking that the response is legitimately signed by the CA and indicates a GOOD status, but not confirming the binding between the response and the requested certificate, Netty exhibits the pattern described by CWE-295: Improper Certificate Validation—trust decisions are made without fully validating all required certificate attributes and associated status information.
Potential impact
- Revocation checks for a target certificate may be bypassed using a replayed GOOD status for a different certificate.
- Applications can incorrectly treat a revoked or untrusted certificate as valid, weakening TLS and PKI trust assumptions.
- Attackers could maintain the apparent validity of compromised certificates beyond revocation, enabling extended impersonation or man-in-the-middle attacks.
- Security controls that rely on OCSP-based revocation may be rendered ineffective for affected certificates.
General mitigation guidance
Effective mitigation focuses on strengthening certificate and OCSP validation logic rather than specific product versions.
Recommended patterns include:
- Ensuring OCSP clients strictly verify that the
CertificateIDin a response matches the originally requestedCertificateIDbefore accepting the status. - Treating OCSP responses as tightly bound to a single certificate, rejecting any response where identifiers or issuer details do not match the request.
- Implementing layered revocation checks (e.g., combining OCSP with CRLs or short-lived certificates) to reduce reliance on a single mechanism.
- Centralizing certificate validation logic and subjecting it to security review, instead of duplicating ad hoc checks in application code.
- Applying least-privilege principles to components that handle certificate trust decisions, limiting the blast radius if validation errors occur.
How teams detect issues like this
Organizations can identify similar issues by focusing on how certificate status is validated in code:
- Static analysis rules that flag OCSP handling where response identifiers are not compared to request identifiers (e.g., missing
CertificateIDequality checks). - Targeted code reviews of TLS and PKI integration points, verifying that every trust decision includes issuer, subject, and status binding checks.
- Security design reviews that trace certificate validation flows end-to-end, ensuring that OCSP or revocation mechanisms do not accept partially validated responses.
- Automated policy enforcement in CI/CD that requires use of vetted validation utilities or libraries, discouraging custom or incomplete OCSP implementations.

