CVE-2026-58062
org.bouncycastle/bcpkix-jdk15on: org.bouncycastle/bcprov-jdk15on: Bouncy Castle for Java: Certificate validation bypass via stapled OCSP response
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 3, 2026
Updated · October 30, 2026
Description
A flaw was found in Bouncy Castle for Java. A remote attacker could exploit this by presenting a stapled Online Certificate Status Protocol (OCSP) response that is not properly bound to the certificate being checked. This vulnerability allows for a certificate validation bypass, potentially leading to applications accepting invalid or revoked certificates. This could enable man-in-the-middle attacks or unauthorized access.
Statement
Important: This vulnerability in Bouncy Castle for Java allows a remote attacker to bypass certificate validation. By presenting a stapled OCSP response not properly bound to the certificate being checked, an attacker could cause applications to accept invalid or revoked certificates. This could facilitate man-in-the-middle attacks or unauthorized access in Red Hat products that rely on Bouncy Castle for certificate path validation.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Where Bouncy Castle performs PKIX revocation checking with stapled OCSP, pin expected peer certificate or public-key fingerprints (CME-404 ↗) so a stapled OCSP response for a different serial cannot substitute trust. Restrict TLS clients to trusted networks and peers (CME-202 ↗, CME-203 ↗) to reduce man-in-the-middle opportunity against revoked certificates. If stapled OCSP is not required, avoid PKIXRevocationChecker.setOcspResponses() and use CRL or online OCSP fetch paths that enforce CertID binding. Upgrade to Bouncy Castle 1.85 or later (BC-LTS 2.73.12, or bc-fips 2.0.2 / 2.1.3) when available.
CVSS / CWE
CVSS 3.1 · 7.4CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
CWE-295 · Improper Certificate Validation