Vulnerabilities > CVE-2017-7411 - Code Injection vulnerability in Enalean Tuleap
Attack vector
NETWORK Attack complexity
LOW Privileges required
LOW Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
An issue was discovered in Enalean Tuleap 9.6 and prior versions. The vulnerability exists because the User::getRecentElements() method is using the unserialize() function with a preference value that can be arbitrarily manipulated by malicious users through the REST API interface, and this can be exploited to inject arbitrary PHP objects into the application scope, allowing an attacker to perform a variety of attacks (including but not limited to Remote Code Execution).
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Leverage Executable Code in Non-Executable Files An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
- Manipulating User-Controlled Variables This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.
Exploit-Db
description | Tuleap 9.6 - Second-Order PHP Object Injection (Metasploit). CVE-2017-7411. Remote exploit for PHP platform. Tags: Metasploit Framework (MSF), Object Injection |
file | exploits/php/remote/43374.rb |
id | EDB-ID:43374 |
last seen | 2017-12-19 |
modified | 2017-12-19 |
platform | php |
port | 443 |
published | 2017-12-19 |
reporter | Exploit-DB |
source | https://www.exploit-db.com/download/43374/ |
title | Tuleap 9.6 - Second-Order PHP Object Injection (Metasploit) |
type | remote |
Metasploit
description | This module exploits a Second-Order PHP Object Injection vulnerability in Tuleap <= 9.6 which could be abused by authenticated users to execute arbitrary PHP code with the permissions of the webserver. The vulnerability exists because of the User::getRecentElements() method is using the unserialize() function with data that can be arbitrarily manipulated by a user through the REST API interface. The exploit's POP chain abuses the __toString() method from the Mustache class to reach a call to eval() in the Transition_PostActionSubFactory::fetchPostActions() method. |
id | MSF:EXPLOIT/UNIX/WEBAPP/TULEAP_REST_UNSERIALIZE_EXEC |
last seen | 2020-06-10 |
modified | 2017-12-18 |
published | 2017-11-01 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/unix/webapp/tuleap_rest_unserialize_exec.rb |
title | Tuleap 9.6 Second-Order PHP Object Injection |
Packetstorm
data source | https://packetstormsecurity.com/files/download/145478/tuleap_rest_unserialize_exec.rb.txt |
id | PACKETSTORM:145478 |
last seen | 2017-12-19 |
published | 2017-12-19 |
reporter | EgiX |
source | https://packetstormsecurity.com/files/145478/Tuleap-9.6-Second-Order-PHP-Object-Injection.html |
title | Tuleap 9.6 Second-Order PHP Object Injection |
References
- https://tuleap.net/plugins/tracker/?aid=10118
- http://www.openwall.com/lists/oss-security/2017/10/23/3
- http://seclists.org/fulldisclosure/2017/Oct/53
- http://packetstormsecurity.com/files/144716/Tuleap-9.6-Second-Order-PHP-Object-Injection.html
- http://karmainsecurity.com/KIS-2017-02
- https://www.exploit-db.com/exploits/43374/