CVE-2026-58059 in Bouncy Castle for Javainfo

Summary

by MITRE • 08/03/2026

In Bouncy Castle for Java before 1.85, Quadratic-time escaping when stringifying X.500 distinguished names. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 08/03/2026

This vulnerability affects the Bouncy Castle cryptographic library for Java, specifically in its handling of X.500 distinguished names during stringification operations. The issue manifests as quadratic time complexity when processing certain input patterns, creating a potential denial of service vector that can significantly impact system performance. The vulnerability is particularly concerning because X.500 distinguished names are commonly used in digital certificate management and security protocols, making this flaw applicable across numerous security implementations.

The technical flaw stems from inefficient string processing algorithms within the library's name parsing and formatting components. When Bouncy Castle encounters certain malformed or specially crafted X.500 distinguished names, the stringification process exhibits exponential time growth rather than linear behavior. This occurs due to inadequate input validation and suboptimal algorithmic design in the name handling code paths, where nested loops or recursive operations scale poorly with input size. The quadratic complexity means that as input length increases, processing time grows at a much faster rate, potentially causing systems to become unresponsive or consume excessive computational resources.

The operational impact of this vulnerability extends beyond simple performance degradation to potential system compromise. Attackers can exploit this weakness by submitting carefully crafted X.500 distinguished names to services relying on Bouncy Castle for certificate processing, leading to denial of service conditions that can disrupt authentication systems, certificate authorities, and other security infrastructure. This type of vulnerability aligns with CWE-798, which addresses the use of hard-coded credentials, but more specifically relates to CWE-502, concerning deserialization of untrusted data, and CWE-400, focusing on resource exhaustion vulnerabilities. The attack surface includes any application that processes X.500 distinguished names through Bouncy Castle libraries.

Mitigation strategies should focus on immediate software updates to the patched versions mentioned in the vulnerability description, with particular attention to the LTS versions and FIPS compliant variants. Organizations should implement input validation measures to detect and reject suspicious X.500 name patterns before they reach the vulnerable parsing code paths. Network segmentation and rate limiting can provide additional protection layers against exploitation attempts. The ATT&CK framework categorizes this vulnerability under T1499, specifically targeting resource exhaustion techniques, making it a critical target for defensive measures in security operations centers. Regular security assessments should include verification of Bouncy Castle library versions and monitoring for potential exploitation attempts through unusual processing patterns or resource consumption spikes.

Responsible

Bcorg

Reservation

06/28/2026

Disclosure

08/03/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you know our Splunk app?

Download it now for free!