CVE-2025-31399
📋 TL;DR
A Cross-Site Request Forgery (CSRF) vulnerability in the Chandan Garg CG Scroll To Top WordPress plugin allows attackers to inject malicious scripts that become stored cross-site scripting (XSS) payloads. This affects WordPress sites using CG Scroll To Top plugin versions up to 3.5. Attackers can trick authenticated administrators into executing actions that inject persistent malicious scripts.
💻 Affected Systems
- Chandan Garg CG Scroll To Top WordPress Plugin
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Attackers could inject persistent malicious JavaScript that steals administrator credentials, redirects users to malicious sites, or takes full control of the WordPress site when administrators view affected pages.
Likely Case
Attackers create fake requests that trick logged-in administrators into saving malicious JavaScript in plugin settings, leading to persistent XSS that affects all users visiting pages with the malicious script.
If Mitigated
With proper CSRF tokens and input validation, the attack would fail as legitimate requests would be rejected without proper authentication tokens.
🎯 Exploit Status
Exploit requires social engineering to trick authenticated users into clicking malicious links. The vulnerability chain (CSRF to Stored XSS) is well-documented and weaponization is likely given the prevalence of WordPress attacks.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.6 or later
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'CG Scroll To Top' plugin. 4. Click 'Update Now' if update available. 5. If no update available, deactivate and delete the plugin, then install version 3.6+ from WordPress repository.
🔧 Temporary Workarounds
Disable Plugin
allTemporarily disable the vulnerable plugin until patched version is available
wp plugin deactivate cg-scroll-to-top
Implement CSRF Protection
allAdd custom CSRF tokens to plugin forms if you must keep vulnerable version
🧯 If You Can't Patch
- Remove plugin management capabilities from users who don't absolutely need them
- Implement web application firewall (WAF) rules to block suspicious POST requests to plugin endpoints
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin > Plugins > Installed Plugins for 'CG Scroll To Top' version. If version is 3.5 or earlier, you are vulnerable.
Check Version:
wp plugin get cg-scroll-to-top --field=version
Verify Fix Applied:
After update, verify plugin version shows 3.6 or later in WordPress admin plugins list.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to /wp-admin/admin-ajax.php with plugin-specific actions
- Multiple failed CSRF validation attempts
Network Indicators:
- Suspicious outbound connections from WordPress site to unknown domains after plugin settings changes
SIEM Query:
source="wordpress.log" AND (uri="/wp-admin/admin-ajax.php" AND action CONTAINS "cg_scroll")