Unauthenticated PHP Object Injection in GiveWP Plugin for WordPre
The GiveWP WordPress plugin deserialised untrusted input from donation form parameters, allowing an unauthenticated attacker to inject a PHP object. With a POP chain present, this could lead to arbitrary file deletion and remote code execution.
The information, tools, and tactics discussed in this material are strictly for educational and ethical cybersecurity research purposes only. This content is intended to help security professionals, researchers, and students understand vulnerabilities, security best practices, and ethical hacking methodologies to…
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 passed user-supplied donation form fields through unserialize() without adequate validation, and a stripslashes_deep call allowed the is_serialized check to be bypassed.
Impact
An unauthenticated attacker could delete arbitrary files and achieve remote code execution, leading to full system compromise.
What the attacker needed
WordPress site with GiveWP plugin <= 3.16.1; A donation form page is accessible; No authentication required
The fix
The issue was mostly patched in version 3.16.1, with further hardening added in 3.16.2.
How it was found
- Set up a WordPress instance with the vulnerable GiveWP plugin version 3.16.0.
- Create a new post containing a GiveWP donation form and copy the post link.
- Run the provided exploit script against the donation form URL with a command to execute.
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.
PHP object injection happens when a program takes data from a user and turns it back into a PHP object without checking it is safe. An attacker can craft that data so the object triggers other code already in the plugin, called a POP chain, which here can run system commands. This means someone who has never logged in could run commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.