header-logo
Suggest Exploit
vendor:
MyBB
by:
Pablo Sacristan
9,8
CVSS
CRITICAL
Remote Code Execution
79
CWE
Product Name: MyBB
Affected Version From: > 1.8.13
Affected Version To: 1.8.13
Patch Exists: YES
Related CWE: CVE-2017-16780
CPE: a:mybb:mybb
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: None
2017

RCE in MyBB up to 1.8.13 via installer

This RCE can be executed via CSRF but doesn't require it (in some special cases). The requirements are there shouldn't be a lock in the /install/ directory and then if you have access to the install directory you don't need CSRF, but if you don't then you need CSRF. There is a CSRF vulnerability in MyBB /install/index.php which can be used to inject PHP code into /inc/config.php which is then used in most of the pages (require MYBB_ROOT."/inc/config.php" is in most of the pages). The vulnerability exists in the table creation process for sqlite databases, this is because the Database Path is then inserted into the /inc/config.php file in line 11 as $config['database']['database'] = 'DB Path'; The vulnerability occurs because MyBB doesn't properly escape the Database Path, allowing an attacker to easily inject PHP by inserting a DB Path of : lol'; echo 'lol this will not cause any parse errors since there will be a : '; added at the end. Of course the attacker can easily just execute code in the server, getting backdoor access to the server easily.

Mitigation:

The vendor has released a patch for this vulnerability in version 1.8.13.
Source

Exploit-DB raw data: