CVE-2021-24915

9.8 CRITICAL

📋 TL;DR

This vulnerability in the Contest Gallery WordPress plugin allows unauthenticated attackers to perform SQL injection attacks and retrieve all registered users' usernames and email addresses. It affects WordPress sites using vulnerable versions of the plugin due to missing capability checks and improper input sanitization.

💻 Affected Systems

Products:
  • Contest Gallery WordPress Plugin
Versions: All versions before 13.1.0.6
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all WordPress installations with vulnerable plugin versions enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, privilege escalation, and potential site takeover via SQL injection.

🟠

Likely Case

Unauthenticated attackers extract user data (usernames and emails) and potentially execute limited SQL queries.

🟢

If Mitigated

No impact if plugin is patched or workarounds are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept exists, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 13.1.0.6

Vendor Advisory: https://wordpress.org/plugins/contest-gallery/#developers

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find Contest Gallery plugin. 4. Click 'Update Now' if available, or manually update to version 13.1.0.6 or later.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily disable the Contest Gallery plugin until patched.

wp plugin deactivate contest-gallery

Web Application Firewall Rule

all

Block requests containing 'cg-search-user-name-original' parameter.

🧯 If You Can't Patch

  • Disable the Contest Gallery plugin immediately.
  • Implement network-level filtering to block exploitation attempts.

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Contest Gallery version number.

Check Version:

wp plugin get contest-gallery --field=version

Verify Fix Applied:

Confirm plugin version is 13.1.0.6 or higher.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests containing 'cg-search-user-name-original' parameter with SQL injection patterns
  • Unusual database queries from web server process

Network Indicators:

  • POST requests to /wp-admin/admin-ajax.php with cg-search-user-name-original parameter
  • SQL error messages in HTTP responses

SIEM Query:

source="web_logs" AND uri="/wp-admin/admin-ajax.php" AND (param="cg-search-user-name-original" OR message="SQL syntax")

🔗 References

📤 Share & Export