Forum (FR)

MAJOR - Security Bu...
 
Notifications
Retirer tout

MAJOR - Security Bug with LDAP authentication

4 Posts
3 Utilisateurs
0 Reactions
5,954 Vu
(@neopk)
Posts: 10
Active Member
Début du sujet
 
[#1899]

Hi,

I discovered a bug when we use LDAP authentication.
I put LDAP username in login input, then i submit login with empty password, we obtain a successfull authentication.

TO fix the problem i modified the /tool/loginCheck.php file on line 21 : replace if ($password=="") {...} by if (AesCtr::decrypt($password, $_SESSION['sessionSalt']=="") . Password is encrypt, so $password is never empty, then when the function ldap_bind (/model/User.php line 798) is used, it always return true because of empty password.

Thank you.


 
Posté : 9 Juil PM 23:077
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

Thank you for this acurate analysis.

What seems strange to me is that code on line 805 in User.php should refuse empty password.

			if (! $bind_user or !$parampassword) {
//debugLog("incorrect binding");			
				return "login";
			}

Moreover, try and disable anonymous connection to your LDAP : empty password should fail.

Anyway, your proposale is cute and will secure this phase.
I will include it in next patch version (V4.3.3)
Thanks.


 
Posté : 10 Juil AM 00:077
(@neopk)
Posts: 10
Active Member
Début du sujet
 

Indeed, this verification seems not to be in 4.1.2 version (we are again on this version), so this bug is probably not on lastests versions. I apologize !

Maybe it will not be fixed yet next time. 🙂

Thanks for your reply.


 
Posté : 10 Juil AM 00:077
Mark Docken
(@mdocken)
Posts: 18
Active Member
 

I am on 4.3.2 with ldap auth. It refuses blank password.


 
Posté : 10 Juil PM 16:077
Share:
Retour en haut