CVE-2026-59638 — bc-java
Fix: bcgit/bc-java@5ac5535CVE-2026-59638 is a CWE-297 vulnerability. A fix is available — see the affected versions and patch details below.
JSSE hostname verifier CN-fallback enabled by default despite documented opt-in
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-59638.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Description
In Bouncy Castle for Java before 1.85, JSSE hostname verifier CN-fallback enabled by default despite documented opt-in. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bctls-fips 1.0.24 (1.0.X series), 2.0.24 (2.0.X series) and 2.1.24 (2.1.X series).
Affected Products
bc-javabouncycastlebctls-fipsbouncycastlebouncy castle for java ltsbouncycastleDetection & mitigation playbook
VulnerabilityDetect
Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).
Fix
Upgrade the affected component to the fixed release for CVE-2026-59638, or apply your distribution's backported patch — distro builds are often patched at an older version number, so check your vendor's advisory rather than the upstream version alone.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
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…
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.Source: Red Hat security advisory for CVE-2026-59638 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-59638 in your dependencies?
Find it across , including transitive dependencies.