leenooks / phpLDAPadmin

phpLDAPadmin - Web based LDAP administration tool
www.phpldapadmin.org
GNU General Public License v2.0
523 stars 166 forks source link

Security Request: Change the default for anonymous binding from true to false #157

Closed jhowe-uw closed 1 year ago

jhowe-uw commented 2 years ago

We are using phpLDAPadmin version 1.2.6.2.

By default, anonymous binding is enabled by default.

I believe this exposes the system to potential data exfiltration, especially when the system has a malformed, incorrect, or has incongruent LDAP ACL policies in relation to operational constraints.

However, this is an admin tool, and as such, should be hardened on an initial deploy.

We were recently graciously tagged offline by a security researcher ( selsel ), who was so kind to point out these weaknesses in our infrastructure via a Google Dork scan ( https://www.google.com/search?q=inurl:/phpldapadmin/cmd.php).

I propose the following code change:

# Set anonymous logging to false by default
$servers->setValue('login', 'anon_bind', false);

I believe this affects the following files:

config/config.php.example

lib/ds_ldap_pla.php

Thanks!

leenooks commented 1 year ago

Thanks for the idea.

This is not something I'm going to implement for 2 reason: