Stored XSS in Paytium 3.0.13 WordPress Plugin
The Paytium WordPress plugin did not properly validate or escape user input in the Name field of payment forms, allowing an attacker to inject HTML and JavaScript that would be stored and executed in the WordPress admin backend and on a public invoice page. An attacker could use this stored cross-site scripting (XSS) to silently create a new administrator account, leading to full WordPress takeover.
medium.com
Published on medium.com
Everyone can create and publish a WordPress plugin, there is no quality control, all you have are the plugin reviews from other users. In the meanwhile a bug in one of your installed WordPress plugins can cause a lot of trouble; yourcustomer data can be stolen or one can even become the administrator of your website.
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
Impact
An attacker could execute arbitrary JavaScript in a WordPress administrator's browser, leading to full site takeover by creating a new admin user, and the stored XSS was also accessible via a public invoice link, making it useful for phishing.
What the attacker needed
Victim is a WordPress administrator; attacker can submit a Paytium form; attacker hosts payload on external domain
The fix
The plugin was fixed by applying proper input validation and HTML escaping, as indicated by the timeline entry that Paytium released a fix.
How it was found
- Enter HTML into the Name field of a Paytium payment form.
- Submit the form and observe that the HTML is rendered in the WordPress admin order overview.
- Host a JavaScript payload on an external short domain that extracts a nonce and creates a new administrator user.
- Inject a script tag pointing to that external payload into the Name field.
- When an administrator views the order, the script runs and adds a new admin account.
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.
When you type your name into a form on a website, the site should treat it as plain text, not as code. Here, the plugin saved the name and later displayed it without cleaning it, so if someone typed HTML or JavaScript, the browser would run it. That let an attacker run their own script in the admin's browser and quietly add a new admin user.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.