FlawAtlas
Search the atlas
CVE-2023-33201 Moderate

CVE-2023-33201

Bouncy Castle For Java before 1.74 is affected by an LDAP injection vulnerability. The vulnerability only affects applications that use an LDAP CertStore from Bouncy Castle to validate X.509 certificates. During the certificate validation process, Bouncy Castle inserts the certificate's Subject Name into an LDAP search filter without any escaping, which leads to an LDAP injection vulnerability.

Exploit probability 0.8%
Published July 5, 2023
Required by Not available
Last source change August 12, 2026

02 / AFFECTED SOFTWARE

Affected packages

Unknown Unknown

1 explicit affected versions

Maven org.bouncycastle:bcprov-debug-jdk14

10 explicit affected versions

Maven org.bouncycastle:bcprov-debug-jdk15on

18 explicit affected versions

Maven org.bouncycastle:bcprov-debug-jdk15to18

7 explicit affected versions

Maven org.bouncycastle:bcprov-debug-jdk18on

3 explicit affected versions

Maven org.bouncycastle:bcprov-ext-jdk14

18 explicit affected versions

Maven org.bouncycastle:bcprov-ext-jdk15on

22 explicit affected versions

Maven org.bouncycastle:bcprov-ext-jdk15to18

8 explicit affected versions

Maven org.bouncycastle:bcprov-ext-jdk18on

3 explicit affected versions

Maven org.bouncycastle:bcprov-jdk14

23 explicit affected versions

Maven org.bouncycastle:bcprov-jdk15on

23 explicit affected versions

Maven org.bouncycastle:bcprov-jdk15to18

11 explicit affected versions

Maven org.bouncycastle:bcprov-jdk18on

4 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities GHSA-hr8g-6v94-x4m9

Bouncy Castle provides the `X509LDAPCertStoreSpi.java` class which can be used in conjunction with the CertPath API for validating certificate paths. Pre-1.73 the implementation did not check the X.500 name of any certificate, subject, or issuer being passed in for LDAP wild cards, meaning the presence of a wild car may lead to Information Disclosure. A potential attack would be to generate a self-signed certificate with a subject name that contains special characters, e.g: `CN=Subject*)(objectclass=`. This will be included into the filter and provides the attacker ability to specify additional attributes in the search query. This can be exploited as a blind LDAP injection: an attacker can enumerate valid attribute values using the boolean blind injection technique. The exploitation depends on the structure of the target LDAP directory, as well as what kind of errors are exposed to the user. Changes to the `X509LDAPCertStoreSpi.java` class add the additional checking of any X.500 name used to correctly escape wild card characters.

View original source
Open Source Vulnerabilities CVE-2023-33201

Bouncy Castle For Java before 1.74 is affected by an LDAP injection vulnerability. The vulnerability only affects applications that use an LDAP CertStore from Bouncy Castle to validate X.509 certificates. During the certificate validation process, Bouncy Castle inserts the certificate's Subject Name into an LDAP search filter without any escaping, which leads to an LDAP injection vulnerability.

View original source

05 / REFERENCES

Further evidence