CVE-2024-3974
📋 TL;DR
This stored XSS vulnerability in BuddyPress allows authenticated users with subscriber-level permissions or higher to inject malicious scripts into web pages via the 'user_name' parameter. The injected scripts execute whenever other users view the compromised pages, potentially affecting all WordPress sites running vulnerable BuddyPress versions.
💻 Affected Systems
- BuddyPress WordPress Plugin
📦 What is this software?
Buddypress by Buddypress
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, redirect users to malicious sites, deface websites, or perform actions on behalf of authenticated users, potentially leading to complete site compromise.
Likely Case
Attackers will typically inject scripts to steal user session cookies or credentials, potentially gaining administrative access to the WordPress site.
If Mitigated
With proper input validation and output escaping, the attack would be prevented, and only sanitized data would be displayed to users.
🎯 Exploit Status
Exploitation requires authenticated access but only at subscriber level. The vulnerability is well-documented with public references showing the exact code locations.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 12.4.1 and later
Vendor Advisory: https://plugins.trac.wordpress.org/changeset/3079691/buddypress
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find BuddyPress and click 'Update Now'. 4. Alternatively, download version 12.4.1+ from WordPress.org and manually update.
🔧 Temporary Workarounds
Disable BuddyPress Plugin
allTemporarily disable the BuddyPress plugin until patching is possible
wp plugin deactivate buddypress
Restrict User Registration
allDisable new user registration to prevent attackers from creating subscriber accounts
wp option update users_can_register 0
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to block XSS payloads in user_name parameter
- Restrict user registration and review existing subscriber accounts for suspicious activity
🔍 How to Verify
Check if Vulnerable:
Check BuddyPress version in WordPress admin under Plugins → Installed Plugins or run: wp plugin get buddypress --field=version
Check Version:
wp plugin get buddypress --field=version
Verify Fix Applied:
Verify BuddyPress version is 12.4.1 or higher using: wp plugin get buddypress --field=version
📡 Detection & Monitoring
Log Indicators:
- Unusual user_name parameter values containing script tags or JavaScript in WordPress/BuddyPress logs
- Multiple failed login attempts followed by successful subscriber-level logins
Network Indicators:
- HTTP requests containing script payloads in user_name parameter
- Outbound connections to suspicious domains from your WordPress server
SIEM Query:
source="wordpress.log" AND ("user_name" AND ("<script" OR "javascript:" OR "onload=" OR "onerror="))
🔗 References
- https://plugins.trac.wordpress.org/browser/buddypress/trunk/bp-members/bp-members-admin.php#L145
- https://plugins.trac.wordpress.org/browser/buddypress/trunk/bp-members/bp-members-blocks.php#L347
- https://plugins.trac.wordpress.org/changeset/3079691/buddypress
- https://www.wordfence.com/threat-intel/vulnerabilities/id/3657384e-025a-44ad-8b7e-1a2fea17dcc3?source=cve
- https://plugins.trac.wordpress.org/browser/buddypress/trunk/bp-members/bp-members-admin.php#L145
- https://plugins.trac.wordpress.org/browser/buddypress/trunk/bp-members/bp-members-blocks.php#L347
- https://plugins.trac.wordpress.org/changeset/3079691/buddypress
- https://www.wordfence.com/threat-intel/vulnerabilities/id/3657384e-025a-44ad-8b7e-1a2fea17dcc3?source=cve