Executive brief
A vulnerability in the Bouncy Castle Java cryptography library could allow attackers to redirect secure network traffic. This occurs when the software incorrectly verifies the identity of a server using its IP address instead of its domain name, making it susceptible to DNS poisoning. An attacker could exploit this to intercept or manipulate data intended for a legitimate service.
Technical details
A vulnerability exists in the Bouncy Castle JSSE (BCJSSE) implementation where hostname verification may be performed against a DNS-resolved IP address rather than the intended hostname. This occurs specifically when endpoint identification is enabled and an SSL socket is created without an explicit hostname, such as through HttpsURLConnection. An attacker capable of performing DNS poisoning could cause the client to verify a certificate against a malicious IP, leading to a successful man-in-the-middle (MITM) attack despite TLS being active. The issue is fixed in BC Java 1.78, BC Java (LTS) 2.73.6, and BC FIPS TLS Java 1.0.19.
Affected products
- Bouncy Castle Bouncy Castle Crypto Package For Java >= 1.61, < 1.78
- Bouncy Castle Bouncy Castle Java LTS < 2.73.6
- Bouncy Castle Bouncy Castle FIPS TLS Java < 1.0.19
Timeline
- 2024-05-03: advisory: GitHub Advisory published
- 2024-05-03: disclosed: NVD publication date