Skip to main content
Vulnerability Database/CVE-2024-12165

CVE-2024-12165: Mollie Contact Form 7 XSS Vulnerability

CVE-2024-12165 is a reflected cross-site scripting flaw in Mollie for Contact Form 7 WordPress plugin that lets unauthenticated attackers inject malicious scripts. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-12165 Overview

CVE-2024-12165 is a Reflected Cross-Site Scripting (XSS) vulnerability in the Mollie for Contact Form 7 plugin for WordPress. The flaw affects all plugin versions up to and including 5.0.0. It stems from insufficient input sanitization and output escaping on the page parameter processed by the plugin's admin menu handler. Unauthenticated attackers can inject arbitrary web scripts that execute when a victim clicks a crafted link. The vulnerability is tracked under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Successful exploitation lets an unauthenticated attacker execute arbitrary JavaScript in an authenticated administrator's browser session, enabling session theft, forced actions, or redirection to attacker-controlled infrastructure.

Affected Products

  • Mollie for Contact Form 7 plugin for WordPress — all versions ≤ 5.0.0
  • WordPress sites with the plugin installed and activated
  • Administrator sessions interacting with the plugin's admin menu pages

Discovery Timeline

  • 2024-12-07 - CVE-2024-12165 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-12165

Vulnerability Analysis

The vulnerability is a Reflected XSS flaw located in the plugin's administrative menu rendering logic. User-controlled data supplied through the page query parameter is reflected back into the HTML response without proper sanitization or output encoding. Because the reflection occurs on an administrative screen, the payload executes in the context of any logged-in user who follows a crafted URL.

The affected code resides in includes/php/admin_menu.php, referenced at line 164 of the plugin source. Exploitation requires user interaction, since the victim must click an attacker-supplied link, but no authentication is required to craft the payload. The scope is changed, meaning injected script runs with the privileges of the targeted WordPress user.

Root Cause

The root cause is a missing call to WordPress sanitization and escaping helpers such as sanitize_text_field() on input and esc_attr() or esc_html() on output. The plugin reads the page parameter from the request and emits it directly into HTML attributes or body content, allowing attacker-controlled markup to be interpreted by the browser [CWE-79].

Attack Vector

The attack is delivered over the network through a specially crafted URL that includes a malicious payload in the page query parameter. An attacker lures a WordPress administrator to click the link through phishing, forum posts, or malicious advertising. When the administrator loads the crafted URL, the plugin reflects the payload back into the admin page, and the browser executes the injected JavaScript. Common post-exploitation outcomes include session cookie theft, creation of rogue administrator accounts via authenticated AJAX calls, or injection of persistent backdoors into the site.

No verified public proof-of-concept code is referenced in the advisory. Technical details are available in the Wordfence Vulnerability Report.

Detection Methods for CVE-2024-12165

Indicators of Compromise

  • Web server access logs containing requests to /wp-admin/admin.php with a page parameter value that includes HTML tags, <script>, onerror=, javascript:, or URL-encoded equivalents such as %3Cscript%3E.
  • Referer headers pointing to external domains for requests targeting the plugin's admin pages.
  • Unexpected creation of WordPress administrator users or modifications to wp_options entries shortly after a suspicious admin page load.

Detection Strategies

  • Inspect WordPress and reverse-proxy logs for page= query strings containing script delimiters or event handler attributes.
  • Deploy a Web Application Firewall (WAF) rule to flag reflected XSS patterns targeting the plugin's admin endpoints.
  • Correlate admin page requests with subsequent privileged actions in the same session as an indicator of successful exploitation.

Monitoring Recommendations

  • Enable detailed audit logging for WordPress administrator accounts, including login origin and privileged action history.
  • Monitor outbound requests from administrator browsers to unknown domains following access to plugin admin pages.
  • Alert on changes to installed plugins, themes, or user roles that follow a flagged page parameter request.

How to Mitigate CVE-2024-12165

Immediate Actions Required

  • Audit WordPress installations for the Mollie for Contact Form 7 plugin and identify any instance at version 5.0.0 or earlier.
  • Deactivate the plugin on affected sites until a patched release is installed.
  • Force password resets and session invalidation for all WordPress administrators who may have clicked suspicious links.

Patch Information

At the time of writing, the NVD entry lists all versions up to and including 5.0.0 as affected. Administrators should consult the Wordfence Vulnerability Report and the plugin's WordPress.org page for the latest fixed version and update as soon as it becomes available.

Workarounds

  • Restrict access to /wp-admin/ using IP allowlists at the web server or WAF layer to limit who can reach vulnerable admin pages.
  • Deploy a WAF rule blocking requests where the page parameter contains HTML tags, event handlers, or encoded script markers.
  • Enforce a strict Content Security Policy (CSP) on the WordPress admin area to limit execution of inline and third-party scripts.
bash
# Example nginx rule to block suspicious 'page' parameter values
if ($arg_page ~* "(<|%3C)\s*script|onerror=|javascript:") {
    return 403;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.