Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.bouncycastle/bcprov-jdk15to18
  4. ›
  5. CVE-2026-58059

CVE-2026-58059: Quadratic-time escaping when stringifying X.500 distinguished names

August 3, 2026 (updated September 16, 2026)

Affects Bouncy Castle for Java before 1.85. IETFUtils.valueToString() escapes special characters by inserting into the same buffer while iterating it, so each insertion shifts the remaining characters and a value of N escapable bytes costs on the order of N^2/2 moves. A single 60 KB RDN of commas or plus signs in a certificate, CSR, CRL or CMS structure pins a CPU core for seconds to minutes whenever the resulting X500Name is printed, compared or hashed, including through the standard JCA principal accessor.

References

  • github.com/bcgit/bc-java/commit/7bf20eea8c1b71a4d3574b75ba20ccf26ffff36b
  • github.com/bcgit/bc-java/wiki/CVE-2026-58059
  • nvd.nist.gov/vuln/detail/CVE-2026-58059

Code Behaviors & Features

Detect and mitigate CVE-2026-58059 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.85.0

Fixed versions

  • 1.85.0

Solution

Upgrade to version 1.85.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

maven/org.bouncycastle/bcprov-jdk15to18/CVE-2026-58059.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:19:58 +0000.