CVE-2026-0636: Bouncy Castle BC-JAVA LDAP injection in LDAPStoreHelper

CVE-2026-0636 · Severity: medium · CVSS 4 · Published 2026-04-15

Bouncy Castle Java (BC-JAVA) is a widely used library for cryptography and certificate processing. A vulnerability in its LDAP certificate store component allows for LDAP injection, which could enable an attacker to manipulate directory queries. If an application uses this library to process un-vetted certificates, it could lead to unauthorized information disclosure from the connected LDAP directory.

Technologies: Legion of the Bouncy Castle Inc. BC-JAVA, org.bouncycastle:bcprov-jdk14 (Maven), org.bouncycastle:bcprov-jdk15to18 (Maven), org.bouncycastle:bcprov-jdk18on (Maven). Vendors: Legion of the Bouncy Castle Inc., Maven.

Quick answers

Is CVE-2026-0636 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-0636 being exploited in the wild.
How severe is CVE-2026-0636?
Medium severity, with a CVSS score of 4, published 15 April 2026.
Which products and versions are affected?
Legion of the Bouncy Castle Inc. BC-JAVA 1.74 to 1.80.1, 1.81, 1.82 to 1.83; org.bouncycastle:bcprov-jdk14 (Maven) >= 1.74, < 1.84, ECOSYSTEM:introduced=1.74,fixed=1.84; org.bouncycastle:bcprov-jdk15to18 (Maven) >= 1.74, < 1.84, ECOSYSTEM:introduced=1.74,fixed=1.84; org.bouncycastle:bcprov-jdk18on (Maven) >= 1.74, < 1.84, ECOSYSTEM:introduced=1.74,fixed=1.84.
Is there a fix for CVE-2026-0636?
Yes. org.bouncycastle:bcprov-jdk14 (Maven): upgrade to 1.84 or later; org.bouncycastle:bcprov-jdk15to18 (Maven): upgrade to 1.84 or later; org.bouncycastle:bcprov-jdk18on (Maven): upgrade to 1.84 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-0636 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-0636?
Check whether you run Legion of the Bouncy Castle Inc. BC-JAVA, org.bouncycastle:bcprov-jdk14 (Maven), org.bouncycastle:bcprov-jdk15to18 (Maven) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • org.bouncycastle:bcprov-jdk14 (Maven): upgrade to 1.84 or later
    # set org.bouncycastle:bcprov-jdk14 to 1.84 in your pom.xml or build.gradle
  • org.bouncycastle:bcprov-jdk15to18 (Maven): upgrade to 1.84 or later
    # set org.bouncycastle:bcprov-jdk15to18 to 1.84 in your pom.xml or build.gradle
  • org.bouncycastle:bcprov-jdk18on (Maven): upgrade to 1.84 or later
    # set org.bouncycastle:bcprov-jdk18on to 1.84 in your pom.xml or build.gradle

Technical details

An LDAP injection vulnerability exists in the LDAPStoreHelper.java file within the org.bouncycastle.x509 package of Bouncy Castle BC-JAVA. The implementation fails to properly sanitize X.500 names (subject or issuer) for LDAP wildcards before incorporating them into directory queries. An attacker providing a specially crafted certificate with wildcard characters can manipulate the resulting LDAP query. This can lead to information disclosure if the API is used in a context that accepts un-vetted certificates. The issue is fixed in versions 1.80.2, 1.81.1, and 1.84 by refactoring DN parsing into a centralized, secure utility class.

Affected products

  • Legion of the Bouncy Castle Inc. BC-JAVA 1.74 to 1.80.1, 1.81, 1.82 to 1.83

Identifiers

  • CVE-2026-0636
  • GHSA-c3fc-8qff-9hwx

Timeline

  • 2026-01-02: patched: Fix committed to repository
  • 2026-04-15: disclosed: Initial vulnerability publication
  • 2026-05-18: advisory: Advisory updated with specific version ranges and technical details

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.