Cloudanix VulnDB

CVE-2021-24946

Critical · 9.8

CVSS

9.8

EPSS

72.8%

Published

Dec 13, 2021

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Attend

A vulnerable calendar plugin can let outsiders read or change a WordPress site’s database without logging in.

Weaponized
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Application
Class
SQL Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

CVE-2021-24946 is an unauthenticated SQL injection vulnerability in the Modern Events Calendar Lite WordPress plugin before version 6.1.5. The plugin fails to sanitize and escape the `time` parameter before using it in a SQL query inside the `mec_load_single_page` AJAX action, which is reachable through WordPress `admin-ajax.php` without authentication. Because the vulnerable endpoint accepts attacker-controlled input and passes it into SQL, an attacker can alter database queries, extract sensitive data, modify database contents, and potentially cause service disruption. With a CVSS score of 9.8, network reachability, no authentication requirement, and weaponized exploit maturity, this is a high-risk web application vulnerability.

Why it matters to the business

Successful exploitation can expose or alter WordPress database contents, including user records, password hashes, plugin data, event data, configuration values, and potentially sensitive business information stored in the site database. Attackers may also use database access to create administrator accounts, modify site content, inject malicious scripts, disrupt the website, or prepare follow-on compromise of the hosting environment. The EPSS score of 0.728 indicates a high likelihood of exploitation activity relative to most vulnerabilities, and weaponized exploitation means internet-facing WordPress sites running vulnerable plugin versions should be treated as urgent remediation targets even though this issue is not currently listed in CISA KEV.

How an attack unfolds

An attacker first identifies a WordPress site using a vulnerable version of Modern Events Calendar Lite. They then send unauthenticated HTTP requests to the WordPress AJAX endpoint, typically `/wp-admin/admin-ajax.php`, with the action set to `mec_load_single_page` and a crafted `time` parameter. Because the plugin does not properly sanitize or escape the `time` value, the attacker can inject SQL syntax into the backend query. The attacker may begin with boolean-based or time-based probes to confirm injection, then escalate to extracting database metadata, enumerating WordPress tables, dumping user records or password hashes, and modifying database values. Depending on database permissions and WordPress configuration, the attacker may attempt to create or promote WordPress administrator users, alter plugin or theme options, inject malicious content into posts or options, or cause database-intensive queries that degrade site availability.

How to fix it

Upgrade Modern Events Calendar Lite to version 6.1.5 or later. If the plugin is no longer required, remove it completely rather than merely deactivating it. Ensure all WordPress core files, themes, and plugins are updated, because attackers commonly chain WordPress plugin vulnerabilities. If immediate upgrade is not possible, restrict access to `/wp-admin/admin-ajax.php` where feasible, deploy a web application firewall rule blocking suspicious `mec_load_single_page` requests with SQL metacharacters in the `time` parameter, and temporarily disable or remove the plugin until it can be patched. Review database users to ensure the WordPress database account has only the minimum privileges required and does not have administrative database permissions.

How to confirm the fix worked

Confirm the installed Modern Events Calendar Lite version is 6.1.5 or later from the WordPress admin plugin inventory, filesystem plugin metadata, or command-line tooling such as WP-CLI. Verify the vulnerable plugin directory is not present if the plugin was removed. Review web server and application logs for requests to `/wp-admin/admin-ajax.php` with `action=mec_load_single_page` and suspicious `time` parameter values. After patching, validate that crafted SQL metacharacters in the `time` parameter are rejected, escaped, or fail safely without SQL errors, time delays, or altered query behavior. Confirm that no unexpected WordPress administrator accounts, modified options, suspicious posts, injected scripts, or unfamiliar plugins/themes were added before or after remediation.

Typical attack path

  1. Scan internet-facing WordPress sites for the Modern Events Calendar Lite plugin or plugin-specific assets.
  2. Identify sites running a vulnerable plugin version earlier than 6.1.5.
  3. Send unauthenticated requests to `/wp-admin/admin-ajax.php` using `action=mec_load_single_page`.
  4. Place SQL injection payloads in the `time` parameter to test for boolean, error-based, or time-based database behavior.
  5. Enumerate database structure, including WordPress table prefixes and user-related tables.
  6. Extract sensitive records such as user information, password hashes, configuration values, or event/plugin data.
  7. Attempt database modification, such as creating an administrator user, changing site options, injecting malicious content, or staging persistence.
  8. Use obtained access or modified content for further compromise, credential attacks, malware injection, spam, defacement, or service disruption.

How to detect it

To determine whether exploitation already occurred, review HTTP access logs, reverse proxy logs, WAF logs, CDN logs, WordPress security plugin logs, PHP error logs, and database logs if available. Focus on unauthenticated requests to `/wp-admin/admin-ajax.php` where the query string or POST body contains `action=mec_load_single_page` and a suspicious `time` value. Indicators include SQL keywords, comment markers, encoded quotes, delay functions such as `SLEEP` or `BENCHMARK`, references to `information_schema`, or database error responses. Look for repeated requests with varying `time` payloads, abnormal 500 responses, unusually long response times, or requests from scanning infrastructure. Post-exploitation review should include new or modified WordPress administrator accounts, unexpected changes in `wp_users`, `wp_usermeta`, and `wp_options`, suspicious plugin or theme installations, injected JavaScript in posts/pages/widgets, and unknown PHP files in WordPress writable directories such as `wp-content/uploads`. Also review outbound connections from the web server and authentication events following suspicious requests, as attackers may use extracted credentials or create persistence after database access.

  • /wp-admin/admin-ajax.php?action=mec_load_single_page
  • action=mec_load_single_page
  • mec_load_single_page
  • time=
  • time=%27
  • time='
  • time=%22
  • time="
  • time=)
  • time=%29
  • UNION SELECT
  • UNION%20SELECT
  • information_schema
  • SLEEP(
  • SLEEP%28
  • BENCHMARK(
  • BENCHMARK%28
  • EXTRACTVALUE(
  • EXTRACTVALUE%28
  • UPDATEXML(
  • UPDATEXML%28
  • -- -
  • #
  • %23
  • /*
  • %2F%2A
  • You have an error in your SQL syntax
  • WordPress database error
  • admin-ajax.php

What your security team should do

  • Prioritize patching or removal of Modern Events Calendar Lite versions earlier than 6.1.5 on all internet-facing WordPress sites.
  • Search historical web access logs for exploitation attempts against `/wp-admin/admin-ajax.php` with `action=mec_load_single_page`, especially requests containing SQL keywords, comments, sleep/delay functions, or database metadata references in the `time` parameter.
  • If exploitation is suspected, perform WordPress incident response: review administrator accounts, recent logins, plugin/theme changes, modified posts/pages, `wp_options` changes, and unexpected files in writable web directories.
  • Reset WordPress administrator passwords and rotate database credentials if database extraction or modification is suspected.
  • Deploy or tune WAF/SIEM detections for SQL injection payloads targeting the `mec_load_single_page` AJAX action.
  • Harden WordPress by enforcing least-privilege database permissions, disabling file editing in the WordPress dashboard, limiting administrative access, and enabling multi-factor authentication for privileged users.
  • Back up the site and database before remediation, then preserve relevant logs and forensic artifacts if suspicious activity is found.

The record

The Modern Events Calendar Lite WordPress plugin before 6.1.5 does not sanitise and escape the time parameter before using it in a SQL statement in the mec_load_single_page AJAX action, available to unauthenticated users, leading to an unauthenticated SQL injection issue

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities