Four ways back in: the WordPress XSS campaign that hides its own admin account
Two unauthenticated stored XSS flaws in WordPress plugins (WPC Product Bundles and Ninja Forms) were exploited to run JavaScript in a logged-in administrator's browser. That script used the admin's own session to install a malicious plugin, create a hidden administrator, and plant a magic login URL, giving the attacker several persistent ways back in.
One JavaScript payload, delivered through multiple WordPress stored XSS flaws, installs an admin account you cannot see in wp-admin. Analysis and IoCs.
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 plugins stored attacker-controlled input and rendered it in the administrative interface without safe HTML encoding, so injected markup executed in the wp-admin origin.
Impact
An attacker could gain full persistent administrative control of the site through four independent backdoors, and removing the vulnerable or malicious plugin closes none of the last three.
What the attacker needed
Victim is a logged-in administrator; admin views the tainted order or submission; no authentication needed to inject
The fix
The plugins were fixed by updating WPC Product Bundles past 8.6.6 and Ninja Forms to 3.15.4 or later, which strengthened output escaping; infected sites also need the hidden accounts, must-use plugins and options removed.
How it was found
- Submit a value with a numeric prefix plus a script tag through the quantity parameter of a WooCommerce order.
- The value is stored in order metadata and rendered unsafely when an administrator views the order.
- The script runs in wp-admin, scrapes CSRF nonces and uses the admin session to upload and install a plugin.
- The script calls emer-run.php to create a hidden administrator and a magic login URL via must-use plugins.
- The script reports results back to the attacker's command-and-control server.
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.
Stored cross-site scripting means an attacker saves malicious JavaScript inside a website's data, such as an order or a form submission, and it runs when an administrator later opens that page. Because the code runs inside the admin's own logged-in browser session, it can do anything the admin can do, like installing plugins or adding users. Here the attackers used that power to leave hidden backdoors so they could return even after the original flaw was patched.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.