Skip to content
RCE Write-up Advanced

WordPress GiveWP POP to RCE (CVE-2024-5932)

An unauthenticated PHP object injection vulnerability in the GiveWP WordPress plugin allowed an attacker to execute arbitrary code by crafting a serialized payload that was stored and later unserialized, leading to a POP chain ending in shell_exec. The author built a full exploit chain by finding a missing gadget class to control the argument passed to shell_exec.

Julien Ahrens Follow

Published on rcesecurity.com

A few days ago, Wordfence published a blog post about a PHP Object Injection vulnerability affecting the popular Wordpress Plugin GiveWP in all versions <= 3.14.1. Since the blog post contains only information about (a part) of the POP chain used, I decided to take a look and build a fully functional Remote Code…

Julien Ahrens (@MrTuxracer), on rcesecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the plugin unserializes user-controlled data (the donor title) without proper validation, allowing PHP object injection.

Impact

An unauthenticated attacker could execute arbitrary code on the server, leading to full compromise.

What the attacker needed

GiveWP plugin enabled; At least one donation form configured; No authentication required

How it was found

  1. Use the give_form_search AJAX action to get the IDs of available donation forms.
  2. Use the give_donation_form_nonce AJAX action with a form ID to get its nonce.
  3. Send a POST request to admin-ajax.php with action=give_process_donation, the form ID, the nonce, and a crafted give_title parameter containing a serialized object.
  4. The serialized object is stored in the database and later unserialized, triggering the POP chain and executing the command.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a bug in a WordPress plugin that lets an attacker run commands on the server without logging in. The plugin takes user input and later turns it back into a PHP object, which can be abused to call dangerous functions like shell_exec. The attacker needs to know a form ID and a nonce, but the plugin provides ways to get both.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Julien Ahrens

View all

17 more disclosed reports, best first.

More from Wordfence

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.