Skip to content

CVE‐2026‐59638

David Hook edited this page Aug 3, 2026 · 1 revision

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

Issue affecting: BC before 1.85 (from 1.61), BC-LTS before 2.73.12, BC-FJA before bctls-fips 1.0.24 (from 1.0.7), 2.0.24 and 2.1.24.

Fixed versions: BC 1.85, BC-LTS 2.73.12, BC-FJA bctls-fips 1.0.24 (from 1.0.7), 2.0.24 and 2.1.24.

Platform affected: Java 8 and later.

HostnameUtil gates the 'match CN when no dNSName SAN exists' fallback on Properties.isOverrideSet(JSSE_HOSTNAME_CHECK_CN_FALLBACK, true), and the two-argument isOverrideSet returns the supplied default (true) when the property is unset. The javadoc for the property says the unset default must DISABLE the fallback, but the code ships with it active in every deployment that doesn't explicitly set the property to false. RFC 5280 name-constraint processing only constrains SAN entries of the constrained type, so a leaf with no dNSName SAN passes a dNSName-constrained chain regardless of its CN. HostnameUtil then falls through to matching the attacker-chosen CN against the target hostname.

The fix was introduced in commit 799bd15320a6 and commit 5ac55351cd1a.

Clone this wiki locally