Bug 2215465 (CVE-2023-33201) - CVE-2023-33201 bouncycastle: potential blind LDAP injection attack using a self-signed certificate
Summary: CVE-2023-33201 bouncycastle: potential blind LDAP injection attack using a s...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2023-33201
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2215467
TreeView+ depends on / blocked
 
Reported: 2023-06-16 06:09 UTC by Sandipan Roy
Modified: 2023-08-09 16:43 UTC (History)
90 users (show)

Fixed In Version: BouncyCastle 1.74
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Bouncy Castle 1.73. This issue targets the fix of LDAP wild cards. Before the fix there was no validation for the X.500 name of any certificate, subject, or issuer, so the presence of a wild card may lead to information disclosure. This could allow a malicious user to obtain unauthorized information via blind LDAP Injection, exploring the environment and enumerating data. The exploit depends on the structure of the target LDAP directory as well as what kind of errors are exposed to the user.
Clone Of:
Environment:
Last Closed: 2023-06-30 00:17:45 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:3954 0 None None None 2023-06-29 20:08:46 UTC

Description Sandipan Roy 2023-06-16 06:09:01 UTC
Issue affecting: BC 1.73 and earlier.

Fixed versions: BC 1.74

Platform affected: Java 4 and later.

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.

https://github.com/bcgit/bc-java/wiki/CVE-2023-33201

Comment 4 errata-xmlrpc 2023-06-29 20:08:41 UTC
This issue has been addressed in the following products:

  Red Hat Fuse 7.12

Via RHSA-2023:3954 https://access.redhat.com/errata/RHSA-2023:3954

Comment 5 Product Security DevOps Team 2023-06-30 00:17:38 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2023-33201


Note You need to log in before you can comment on or make changes to this bug.