CVE-2026-18501: UsersWP Badge Widget Stored XSS via Variable Substitution
UsersWP's badge widget substituted a Subscriber's stored profile value into the badge text and then decoded HTML entities over the whole string, turning an entity-encoded tag back into live markup that was output without escaping. A Subscriber could therefore run arbitrary JavaScript in the browser of anyone, including administrators, who loaded a page showing an affected badge.
cryptocat.me
Published on cryptocat.me
UsersWP's badge widget and [uwpuserbadge] shortcode support admin-authored templates containing %%input%% or named profile-field tokens. The plugin decoded HTML entities after filling those templates, turning harmless stored text back into executable markup.
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
The badge renderer decoded HTML entities after substituting untrusted profile values into the badge template, and the resulting content was passed to the UI component without output escaping.
Impact
Arbitrary JavaScript could run in the browser of anyone loading an affected badge, including logged-out visitors and administrators, but only where an administrator had configured a badge using the input token or a user-writable field token.
What the attacker needed
UsersWP <= 1.2.69 active; a Subscriber account; admin-configured badge with a field token
The fix
UsersWP 1.2.70 was released to fix it by decoding the admin template before substitution and escaping the inserted values.
How it was found
- Log in as a Subscriber and load the account page to obtain the account nonce.
- Submit the account form with an entity-encoded image tag in the First Name field.
- Confirm the encoded value is stored and shown back on the account page.
- Have a victim load a page containing a badge that uses the input token or the field token.
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.
A profile field is meant to hold plain text, so the plugin cleans it and stores it safely. Later, when building a badge, the plugin pastes that text into a template and then converts encoded characters back into real HTML, and the badge component prints the result without escaping. That means a low-privileged user can plant a small script that runs in other people's browsers when they view the badge.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.