CVE-2021-38342

8.1 HIGH

📋 TL;DR

This CSRF vulnerability in the Nested Pages WordPress plugin allows attackers to trick authenticated administrators into performing unauthorized actions. Attackers can delete, modify, or reassign ownership of any WordPress posts. WordPress sites using vulnerable versions of the Nested Pages plugin are affected.

💻 Affected Systems

Products:
  • Nested Pages WordPress Plugin
Versions: <= 3.1.15
Operating Systems: Any OS running WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with Nested Pages plugin enabled. Administrator or editor privileges are needed for the CSRF attack to succeed.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete content destruction where attackers permanently delete all posts, modify critical content, or take over site ownership by reassigning posts to attacker-controlled accounts.

🟠

Likely Case

Selective content manipulation where attackers delete or modify specific posts to disrupt operations, deface content, or cause reputational damage.

🟢

If Mitigated

No impact if proper CSRF protections are implemented or if the plugin is updated/disabled.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires tricking an authenticated administrator into clicking a malicious link or visiting a compromised page. The vulnerability is well-documented in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.1.16

Vendor Advisory: https://wordpress.org/plugins/wp-nested-pages/#developers

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find Nested Pages plugin. 4. Click 'Update Now' if available. 5. Alternatively, download version 3.1.16+ from WordPress repository and manually update.

🔧 Temporary Workarounds

Disable Nested Pages Plugin

all

Temporarily disable the vulnerable plugin until patched

wp plugin deactivate wp-nested-pages

Implement CSRF Protection Headers

linux

Add security headers to WordPress to help prevent CSRF attacks

Add to .htaccess: Header set X-Frame-Options "DENY"
Add to .htaccess: Header set Content-Security-Policy "frame-ancestors 'none'"

🧯 If You Can't Patch

  • Remove Nested Pages plugin entirely and use alternative page management solutions
  • Implement strict access controls and educate administrators about CSRF risks and safe browsing practices

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Nested Pages to see if version is 3.1.15 or lower

Check Version:

wp plugin get wp-nested-pages --field=version

Verify Fix Applied:

Verify Nested Pages plugin version is 3.1.16 or higher in WordPress admin panel

📡 Detection & Monitoring

Log Indicators:

  • Unusual bulk post deletions or modifications in WordPress logs
  • Multiple admin_post requests to npBulkActions or npBulkEdit endpoints
  • Sudden changes in post ownership or status

Network Indicators:

  • POST requests to /wp-admin/admin-post.php with npBulkActions or npBulkEdit parameters from unexpected sources
  • CSRF token missing in administrative actions

SIEM Query:

source="wordpress.log" AND ("npBulkActions" OR "npBulkEdit") AND ("trashed" OR "deleted" OR "reassigned")

🔗 References

📤 Share & Export