CVE-2024-9878
📋 TL;DR
This vulnerability allows authenticated attackers with administrator-level permissions to inject malicious scripts into WordPress admin settings pages. The injected scripts execute whenever users access affected pages, potentially compromising user sessions or performing unauthorized actions. Only affects WordPress multi-site installations and installations where unfiltered_html capability is disabled.
💻 Affected Systems
- Photo Gallery by 10Web - Mobile-Friendly Image Gallery WordPress plugin
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Administrator account compromise leading to full site takeover, data theft, or malware distribution to site visitors.
Likely Case
Session hijacking of other administrators, defacement of admin pages, or credential theft via phishing.
If Mitigated
Limited impact due to requiring admin credentials and specific configuration conditions.
🎯 Exploit Status
Exploitation requires administrator credentials. Public proof-of-concept exists on Packet Storm Security.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.8.31 or later
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'Photo Gallery by 10Web'. 4. Click 'Update Now' if available. 5. Alternatively, download version 1.8.31+ from WordPress.org and manually update.
🔧 Temporary Workarounds
Disable vulnerable plugin
allTemporarily disable the Photo Gallery plugin until patched
wp plugin deactivate photo-gallery
Enable unfiltered_html for admins
allEnable unfiltered_html capability for administrator roles (makes vulnerability inactive per CVE description)
Add define('DISALLOW_UNFILTERED_HTML', false); to wp-config.php
🧯 If You Can't Patch
- Remove administrator access from untrusted users
- Implement web application firewall (WAF) rules to block XSS payloads
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin → Plugins → Photo Gallery by 10Web. If version is 1.8.30 or lower, you are vulnerable if using multi-site OR unfiltered_html is disabled.
Check Version:
wp plugin get photo-gallery --field=version
Verify Fix Applied:
Verify plugin version is 1.8.31 or higher in WordPress admin panel.
📡 Detection & Monitoring
Log Indicators:
- Unusual admin user activity, suspicious POST requests to photo gallery settings pages
- JavaScript payloads in admin area logs
Network Indicators:
- Unexpected script tags in HTTP responses from gallery pages
- External script loads from gallery admin pages
SIEM Query:
source="wordpress.log" AND ("photo-gallery" OR "bwg") AND ("script" OR "onload" OR "onerror" OR "javascript:")
🔗 References
- https://packetstormsecurity.com/files/179357/WordPress-Photo-Gallery-1.8.26-Cross-Site-Scripting.html
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3180567%40photo-gallery%2Ftrunk&old=3171538%40photo-gallery%2Ftrunk&sfp_email=&sfph_mail=#file12
- https://www.wordfence.com/threat-intel/vulnerabilities/id/bfa1192b-34f5-4b71-8fff-14f2d4ac4aca?source=cve