Advisories for Maven/Org.bouncycastle/Bctls-Fips package

2026

Possible OOM from unbounded up-front allocation on a definite-length read

Affects Bouncy Castle for Java FIPS (BC-FJA) bctls-fips before 1.0.24 (1.0.X series). Definite-length ASN.1 parsing allocated the entire declared object length as soon as the header was read. A few crafted header bytes arriving over a non-rewindable stream, such as a TLS record layer or a socket-backed certificate read, could trigger a near-heap-sized allocation before any content byte was consumed. Definite-length objects are now grown incrementally through the stream, so …

JSSE hostname verifier CN-fallback enabled by default despite documented opt-in

Affects Bouncy Castle for Java FIPS (BC-FJA) bctls-fips before 1.0.24 (1.0.X series), 2.0.24 (2.0.X series) and 2.1.24 (2.1.X series). HostnameUtil gates the fallback that matches the certificate CN when no dNSName SAN is present on a property whose unset default the code treats as enabled, contrary to its documentation. Because name-constraint processing only constrains SAN entries of the constrained type, a leaf with no dNSName SAN passes a dNSName-constrained chain, …

DTLS handshake reassembler allocates buffer from unchecked 24-bit length

Affects Bouncy Castle for Java FIPS (BC-FJA) bctls-fips before 1.0.24 (1.0.X series), 2.0.24 (2.0.X series) and 2.1.24 (2.1.X series). DTLSReliableHandshake.processRecord() allocates a reassembly buffer sized from the 24-bit handshake length field of an incoming record, without the maximum-message-size check the stream-TLS path applies. Up to sixteen message sequences may be buffered per connection, so a single record of about 205 bytes carrying sixteen fragment headers with a maximal length forces …

2025
2024

Bouncy Castle Java Cryptography API vulnerable to DNS poisoning

An issue was discovered in the Bouncy Castle Crypto Package For Java before BC TLS Java 1.0.19 (ships with BC Java 1.78, BC Java (LTS) 2.73.6) and before BC FIPS TLS Java 1.0.19. When endpoint identification is enabled in the BCJSSE and an SSL socket is created without an explicit hostname (as happens with HttpsURLConnection), hostname verification could be performed against a DNS-resolved IP address in some situations, opening up …