GitHub Advisoryadvisory · Maven

GHSA-hr8g-6v94-x4m9 Bouncy Castle For Java LDAP injection vulnerability

MEDIUM Published 2023-07-05 Modified 2023-09-05 Official page ↗
Aliases
CVE-2023-33201
Ecosystem
Maven
Packages
org.bouncycastle:bcprov-jdk18on, org.bouncycastle:bcprov-jdk15to18, org.bouncycastle:bcprov-jdk14, org.bouncycastle:bcprov-ext-jdk14, org.bouncycastle:bcprov-ext-jdk15to18, org.bouncycastle:bcprov-ext-jdk18on, org.bouncycastle:bcprov-debug-jdk14, org.bouncycastle:bcprov-debug-jdk15to18, org.bouncycastle:bcprov-debug-jdk18on, org.bouncycastle:bcprov-jdk15on, org.bouncycastle:bcprov-ext-jdk15on, org.bouncycastle:bcprov-debug-jdk15on
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Weaknesses
CWE-295
Reviewed
2023-07-06

Affected packages

• Maven org.bouncycastle:bcprov-jdk18on: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-jdk15to18: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-jdk14: >= 1.49, < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-ext-jdk14: >= 1.49, < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-ext-jdk15to18: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-ext-jdk18on: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-debug-jdk14: >= 1.49, < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-debug-jdk15to18: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-debug-jdk18on: < 1.74 → fixed in 1.74 • Maven org.bouncycastle:bcprov-jdk15on: >= 1.49, <= 1.70 (no fix yet) • Maven org.bouncycastle:bcprov-ext-jdk15on: >= 1.49, <= 1.70 (no fix yet) • Maven org.bouncycastle:bcprov-debug-jdk15on: >= 1.49, <= 1.70 (no fix yet)

Description

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.

Related

Alias · CVE (1)

  • CVE-2023-33201 Bouncy Castle For Java before 1.74 is affected by an LDAP injection vulnerability. vulnerability

Weakness · CWE (1)

  • CWE-295 Improper Certificate Validation weakness

References