CVE-2026-59638

Description

A flaw was found in Bouncy Castle for Java. The Java Secure Socket Extension (JSSE) hostname verifier incorrectly enables the Common Name (CN) fallback by default, despite it being documented as an opt-in feature. This misconfiguration could allow a remote attacker to bypass proper hostname validation by presenting a specially crafted certificate during a TLS (Transport Layer Security) handshake. As a result, an attacker might be able to impersonate a legitimate server, leading to potential man-in-the-middle attacks and information disclosure.

Statement

A flaw was found in Bouncy Castle for Java's JSSE provider (bctls). The hostname verifier improperly enables Common Name (CN) fallback by default during TLS certificate validation, contrary to documented opt-in requirements. A remote attacker capable of intercepting TLS traffic could exploit this by presenting a specially crafted certificate with a matching CN, bypassing hostname verification. This allows the attacker to impersonate a trusted server, leading to potential Man-in-the-Middle (MitM) attacks and exposure of sensitive encrypted data.

Mitigation

Explicitly configure the Bouncy Castle JSSE hostname verifier to disable CN fallback programmatically in application initialization code, or restrict TLS connections to trusted endpoints using explicit SAN (Subject Alternative Name) validation parameters.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.46.5N/A
Attack VectorNetworkNetworkN/A
Attack ComplexityHighLowN/A
Privileges RequiredNoneNoneN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityHighLowN/A
Integrity ImpactHighLowN/A
Availability ImpactNoneNoneN/A

Vector

Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Understanding the Weakness (CWE)

Integrity,Authentication

Technical Impact: Bypass Protection Mechanism; Gain Privileges or Assume Identity

When a certificate is invalid or malicious, it might allow an attacker to spoof a trusted entity by interfering in the communication path between the host and client. The product might connect to a malicious host while believing it is a trusted host, or the product might be deceived into accepting spoofed data that appears to originate from a trusted host.

Frequently Asked Questions

Want to get errata notifications? Sign up here.