Zero-Day Stored XSS in Social Warfare
The Social Warfare WordPress plugin contained a stored cross-site scripting flaw in its debugging features, which could be triggered by unauthenticated requests using specific GET parameters. Attackers could inject malicious JavaScript that would be stored and executed in visitors' browsers, redirecting them to malicious sites.
blog.sucuri.net
Published on blog.sucuri.net
A zero-day vulnerability has just appeared in the WordPress plugin world, affecting over 70,000 sites using the Social Warfare plugin.
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's debugging features, which relied on GET parameters, failed to properly sanitise input before storing it, allowing script injection.
Impact
Attackers could redirect users to malicious sites, and because the attack is unauthenticated and automated, it could be mounted at scale against vulnerable sites.
What the attacker needed
Social Warfare plugin below 3.5.3; No authentication needed
The fix
The vulnerability was fixed in version 3.5.3, and users were advised to update; alternatively, a firewall could virtually patch it.
How it was found
- Send a request to a PHP file under /wp-admin/ with the swp_debug and swp_url parameters.
- The swp_url parameter points to a remote file containing a malicious payload.
- The payload is stored in the site's database and executed when pages are loaded.
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 stored cross-site scripting (XSS) bug. The plugin had a hidden debugging feature that let anyone make the site save harmful JavaScript code. When other people visited the site, their browsers would run that code, which could redirect them to a malicious website.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.