CVE-2020-27481

9.8 CRITICAL

📋 TL;DR

This vulnerability allows unauthenticated attackers to perform SQL injection attacks on WordPress sites using the Good Layers LMS plugin version 2.1.4 or earlier. Attackers can execute arbitrary SQL commands through the 'id' parameter in the booking cancellation function, potentially compromising the entire database. All WordPress installations with the vulnerable plugin are affected.

💻 Affected Systems

Products:
  • Good Layers LMS Plugin for WordPress
Versions: <= 2.1.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with the vulnerable plugin enabled. The vulnerability is accessible via wp-admin/admin-ajax.php endpoint.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution through database functions.

🟠

Likely Case

Data exfiltration of sensitive user information, plugin/WordPress configuration disclosure, and potential site defacement.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and web application firewall rules blocking SQL injection patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires no authentication and uses simple SQL injection techniques. Public proof-of-concept code is available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: > 2.1.4

Vendor Advisory: https://wordpress.org/plugins/goodlayers-lms/

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find Good Layers LMS plugin. 4. Click 'Update Now' if available. 5. If no update available, deactivate and remove the plugin immediately.

🔧 Temporary Workarounds

Disable vulnerable endpoint via .htaccess

linux

Block access to the vulnerable admin-ajax.php endpoint for unauthenticated users

# Add to .htaccess in WordPress root directory
<Files "admin-ajax.php">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Files>

Web Application Firewall rule

all

Add WAF rule to block SQL injection patterns in POST parameters

# Example ModSecurity rule
SecRule ARGS_POST:id "@detectSQLi" "id:1001,phase:2,deny,status:403,msg:'SQL Injection attempt detected'"

🧯 If You Can't Patch

  • Deactivate and remove the Good Layers LMS plugin immediately
  • Implement network-level blocking of /wp-admin/admin-ajax.php for external IPs

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel → Plugins → Good Layers LMS → Version number. If version is 2.1.4 or lower, you are vulnerable.

Check Version:

wp plugin list --name="goodlayers-lms" --field=version

Verify Fix Applied:

After updating, verify plugin version is greater than 2.1.4. Test the vulnerable endpoint with SQL injection payloads to confirm blocking.

📡 Detection & Monitoring

Log Indicators:

  • POST requests to /wp-admin/admin-ajax.php with SQL keywords in parameters
  • Multiple failed SQL queries from same IP
  • Unusual database error messages in logs

Network Indicators:

  • HTTP POST requests to admin-ajax.php with action=gdlr_lms_cancel_booking
  • SQL syntax in POST parameter values
  • Unusual database connection patterns

SIEM Query:

source="web_logs" AND uri_path="/wp-admin/admin-ajax.php" AND (http_method="POST" AND (param_name="id" AND param_value MATCHES "(?i)(union|select|insert|update|delete|drop|--|#|\/\*)"))

🔗 References

📤 Share & Export