Responsive Blocks <= 2.2.0 - Unauthenticated Open Email Relay via REST API 'email_to' Parameter
Description
The Responsive Blocks – Page Builder for Blocks & Patterns plugin for WordPress is vulnerable to Unauthenticated Open Email Relay in all versions up to, and including, 2.2.0. This is due to insufficient authorization checks and missing server-side validation of the recipient email address supplied via a public REST API route. This makes it possible for unauthenticated attackers to send arbitrary emails to any recipient of their choosing through the affected WordPress site's mail server, effectively turning the site into an open mail relay.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=2.2.0Source Code
WordPress.org SVN# Exploitation Research Plan - CVE-2026-6675 ## 1. Vulnerability Summary The **Responsive Blocks** plugin (<= 2.2.0) contains an unauthenticated open email relay vulnerability. The flaw exists within a public WordPress REST API endpoint that handles email functionality (likely associated with a con…
Show full research plan
Exploitation Research Plan - CVE-2026-6675
1. Vulnerability Summary
The Responsive Blocks plugin (<= 2.2.0) contains an unauthenticated open email relay vulnerability. The flaw exists within a public WordPress REST API endpoint that handles email functionality (likely associated with a contact form or lead generation block). The endpoint accepts a recipient address via the email_to parameter without verifying that the address belongs to an authorized site administrator or is hardcoded in the block configuration. Consequently, an unauthenticated attacker can use the WordPress site's server to send arbitrary emails to any destination.
2. Attack Vector Analysis
- Endpoint: A REST API route registered under the plugin's namespace (likely
responsive-blocks/v1orresponsive-block-editor-addons/v1). - HTTP Method:
POST - Vulnerable Parameter:
email_to - Authentication: None (Unauthenticated).
- Preconditions: The plugin must be active. The specific block that utilizes this REST route does not necessarily need to be published on a page if the REST API is globally accessible, though a nonce might be required if the
permission_callbackis tied to one.
3. Code Flow
- Route Registration: The plugin registers a REST route during the
rest_api_inithook usingregister_rest_route(). - Missing Authorization: The
permission_callbackfor this route likely returns__return_trueor lacks acurrent_user_can()check. - Input Processing: The handler function associated with the route retrieves the
email_toparameter from theWP_REST_Requestobject via$request->get_param('email_to'). - Sink: The unsanitized/unvalidated
email_tovalue is passed directly as the first argument ($to) to thewp_mail()function.
4. Nonce Acquisition Strategy
REST API endpoints in WordPress often require a wp_rest nonce passed in the _wpnonce parameter or the X-WP-Nonce header.
- Identify the Script Variable: Search the codebase for
wp_localize_scriptto see where the REST URL and nonce are passed to the frontend.- Command:
grep -rn "wp_localize_script" .
- Command:
- Target Block: The email functionality is likely part of a "Contact Form" or "Newsletter" block. Identify the shortcode or block name.
- Setup for Extraction:
- Create a page containing the relevant block:
wp post create --post_type=page --post_status=publish --post_content='<!-- wp:responsive-blocks/contact-form /-->'. (The exact block name should be verified viagrep -rn "register_block_type" .).
- Create a page containing the relevant block:
- Extract via Browser:
- Navigate to the newly created page using
browser_navigate. - Execute
browser_evalto find the nonce. - Example JS:
window.responsive_blocks_params?.nonceorwindow.rb_data?.rest_nonce(Search for exact keys in the source).
- Navigate to the newly created page using
Note: If the permission_callback is truly empty or __return_true, a nonce may not be required at all.
5. Exploitation Strategy
- Locate Endpoint: Search the plugin for the specific REST route.
- Command:
grep -r "register_rest_route" . - Look for routes that reference
email_to.
- Command:
- Determine Parameters: Identify other required parameters (e.g.,
subject,message,name). - Craft the Request:
- URL:
http://<target>/wp-json/responsive-blocks/v1/send-email(inferred route). - Headers:
Content-Type: application/json - Body:
{ "email_to": "target-victim@example.com", "subject": "Important Security Update", "message": "This is an arbitrary message sent via your own server.", "reply_to": "attacker@evil.com" }
- URL:
- Execute: Use the
http_requesttool to send the POST request.
6. Test Data Setup
- Install and activate
responsive-block-editor-addonsversion 2.2.0. - (Optional) Create a page with the contact form block to identify the exact REST parameters used by the legitimate frontend.
wp post create --post_type=page --post_title="Contact" --post_status=publish --post_content='<!-- wp:responsive-blocks/contact-form /-->'
- Ensure
WP_DEBUGis enabled to catch anywp_mailerrors.
7. Expected Results
- The server should return a
200 OKor201 Createdstatus code. - The response body might contain
{"success": true}or similar confirmation. - The WordPress mail system will attempt to deliver an email to
target-victim@example.com.
8. Verification Steps
- Intercept Email: Use
wp-clito check the mail log if a logging plugin (like WP Mail Logging) is installed. - Debug Log: Check
wp-content/debug.logfor any output from thewp_mailfilter or errors. - Manual Check: If the test environment has a catch-all mailbox (like MailHog), verify the arrival of the email with the attacker-specified subject and body.
- Code Audit Verification:
- Verify that the
permission_callbackinincludes/rest-api/class-responsive-blocks-rest-api.php(inferred path) does not check formanage_optionsor similar capabilities.
- Verify that the
9. Alternative Approaches
- Form-Data: If the REST API does not accept JSON, try
Content-Type: application/x-www-form-urlencoded. - Action Parameter: Check if the route is actually a generic one that takes an
actionparameter to determine which function to run (e.g.,?action=submit_form). - Default Recipients: If
email_tois ignored, check if other parameters liketo_emailorrecipientare used instead. The grep foremail_tois the primary source of truth.
Summary
The Responsive Blocks plugin for WordPress is vulnerable to an unauthenticated open email relay because it fails to validate the recipient address in its REST API. An attacker can specify any email address in the 'email_to' parameter, causing the WordPress site to send arbitrary messages to third parties using its own mail server.
Exploit Outline
1. Locate the REST API endpoint registered by the plugin, typically under the 'responsive-blocks/v1' namespace. 2. Prepare a POST request to the endpoint (e.g., /wp-json/responsive-blocks/v1/send-email). 3. Set the 'email_to' parameter in the request body to the intended victim's email address. 4. Populate other parameters such as 'subject', 'message', and 'name' with the desired spam or phishing content. 5. Execute the request unauthenticated; the server will process the request and call wp_mail() with the attacker-supplied recipient, effectively acting as an open mail relay.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.