Executive brief
Bouncy Castle is a cryptography library used by Java applications to handle certificate validation and X.509 certificate chain processing. A flaw in the Name Constraints validation logic allows attackers to bypass certificate name verification by appending a trailing dot to domain names in email addresses and URIs. This could enable attackers to issue fraudulent certificates that pass validation checks, potentially leading to man-in-the-middle attacks, credential theft, and compromise of encrypted communications.
Technical details
The vulnerability is an improper certificate validation flaw (CWE-295) in Bouncy Castle's Name Constraints checking for rfc822Name and URI fields. The root cause is insufficient validation that allows trailing dots in domain names to bypass Name Constraints restrictions. An attacker can craft a certificate with a rfc822Name or URI containing a trailing dot (e.g., "attacker.com.") that will bypass name constraints intended to restrict issuance to specific domains. The attack requires network reachability to a system using Bouncy Castle for certificate validation, requires no authentication or user interaction, and can be exploited remotely. Patches are available: version 1.85 for bcprov-jdk15to18/jdk18on, version 2.73.12 for bcprov-lts8on, and version 1.0.2.7/2.0.2/2.1.3 for bc-fips across its version branches.
Affected products
- Bouncy Castle bcprov-jdk15to18 before 1.85
- Bouncy Castle bcprov-jdk18on before 1.85
- Bouncy Castle bcprov-lts8on before 2.73.12
- Bouncy Castle bc-fips before 1.0.2.7 (1.0.X), before 2.0.2 (2.0.X), before 2.1.3 (2.1.X)
Timeline
- 2026-08-03: disclosed
- 2026-08-03: patched: Patches released: bcprov 1.85, bcprov-lts8on 2.73.12, bc-fips 1.0.2.7/2.0.2/2.1.3