CVE-2022-4949

8.8 HIGH

📋 TL;DR

The AdSanity WordPress plugin up to version 1.8.1 contains a vulnerability that allows authenticated users with Contributor-level permissions or higher to upload arbitrary files to the server. This can lead to remote code execution by uploading malicious files like PHP shells. WordPress sites using vulnerable AdSanity plugin versions are affected.

💻 Affected Systems

Products:
  • WordPress AdSanity Plugin
Versions: Up to and including 1.8.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with Contributor role or higher. WordPress multisite installations may be affected differently.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise through remote code execution, allowing attackers to steal data, install malware, or pivot to other systems.

🟠

Likely Case

Website defacement, data theft, or installation of backdoors for persistent access.

🟢

If Mitigated

Limited impact if proper file upload restrictions and web application firewalls are in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires valid WordPress user account with Contributor privileges. Public exploit code exists in security advisories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.8.2 or later

Vendor Advisory: https://wordpress.org/plugins/adsanity/

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find AdSanity plugin. 4. Click 'Update Now' if available. 5. If not, download version 1.8.2+ from WordPress.org and manually update.

🔧 Temporary Workarounds

Disable AdSanity Plugin

all

Temporarily disable the vulnerable plugin until patched.

wp plugin deactivate adsanity

Restrict File Uploads via .htaccess

linux

Block execution of uploaded files in wp-content/uploads/adsanity directory.

<FilesMatch "\.(php|php5|php7|phtml|phar)$">\n  Order Allow,Deny\n  Deny from all\n</FilesMatch>

🧯 If You Can't Patch

  • Remove Contributor and higher role permissions from untrusted users
  • Implement web application firewall rules to block malicious file uploads

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > AdSanity version. If version is 1.8.1 or lower, you are vulnerable.

Check Version:

wp plugin get adsanity --field=version

Verify Fix Applied:

Verify AdSanity plugin version is 1.8.2 or higher in WordPress admin.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /wp-content/uploads/adsanity/
  • POST requests to /wp-admin/admin-ajax.php with action=adsanity_ajax_upload

Network Indicators:

  • HTTP POST requests uploading files with non-image extensions to AdSanity endpoints

SIEM Query:

source="wordpress.log" AND (uri_path="/wp-admin/admin-ajax.php" AND post_data="adsanity_ajax_upload")

🔗 References

📤 Share & Export