CVE-2025-68008

Mail <= 1.3 - Reflected Cross-Site Scripting

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.1
CVSS Score
6.1
CVSS Score
medium
Severity
Unpatched
Patched in
N/A
Time to patch

Description

The Mail plugin for WordPress is vulnerable to Reflected Cross-Site Scripting in versions up to, and including, 1.3 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=1.3
PublishedJanuary 16, 2026
Last updatedJanuary 19, 2026
Affected pluginwp-mail
Research Plan
Unverified

# Exploitation Research Plan: CVE-2025-68008 (WP Mail <= 1.3) ## 1. Vulnerability Summary The **WP Mail** plugin (versions <= 1.3) contains a reflected cross-site scripting (XSS) vulnerability. The issue arises because the plugin retrieves user-supplied input from URL parameters (typically via `$_G…

Show full research plan

Exploitation Research Plan: CVE-2025-68008 (WP Mail <= 1.3)

1. Vulnerability Summary

The WP Mail plugin (versions <= 1.3) contains a reflected cross-site scripting (XSS) vulnerability. The issue arises because the plugin retrieves user-supplied input from URL parameters (typically via $_GET or $_REQUEST) and echoes it back into the HTML response without adequate sanitization (using functions like sanitize_text_field) or output escaping (using functions like esc_html or esc_attr). This allows an attacker to execute arbitrary JavaScript in the context of a user's session if that user clicks a crafted link.

2. Attack Vector Analysis

  • Endpoint: The vulnerability is likely located in the plugin's admin settings page or a specialized mailing/test-mail page.
  • Vulnerable Slug: wp-mail (accessible via wp-admin/options-general.php?page=wp-mail or wp-admin/admin.php?page=wp-mail).
  • Vulnerable Parameter: Likely a status or message parameter such as message, error, s, or status (inferred).
  • Authentication: Unauthenticated. While the victim must be a logged-in administrator for the XSS to have high impact (e.g., account takeover), the attacker does not need any privileges to generate the malicious link.
  • Preconditions: The plugin must be active.

3. Code Flow (Inferred)

  1. Entry Point: The plugin registers an admin page using add_options_page() or add_menu_page() in the admin_menu hook.
  2. Logic Path: The callback function for this admin page (e.g., wp_mail_settings_page()) is executed when the page=wp-mail parameter is present in the URL.
  3. Vulnerable Source: Inside the callback, the code checks for a specific GET parameter to display feedback (e.g., "Settings Saved" or "Email Sent").
    • Example: $msg = $_GET['message'];
  4. Vulnerable Sink: The code echoes this variable directly into the HTML.
    • Example: echo '<div class="updated"><p>' . $msg . '</p></div>';
  5. Lack of Escaping: Because $msg is not wrapped in esc_html(), a payload like <script>alert(1)</script> is executed by the browser.

4. Nonce Acquisition Strategy

Reflected XSS via GET parameters typically does not require a nonce for the reflection itself. Nonces are used to prevent CSRF (Cross-Site Request Forgery) for actions that modify state. However, if the reflection only occurs after a successful form submission that is nonce-protected, the strategy is as follows:

  1. Identify Action: Find the form on the wp-mail settings page.
  2. Identify Shortcode/Page: If the plugin has a frontend component, create a post with its shortcode: wp post create --post_type=page --post_status=publish --post_content='[wp_mail_form]' (inferred).
  3. Extract Nonce:
    • Navigate to the settings page: browser_navigate("/wp-admin/options-general.php?page=wp-mail").
    • Execute JS to find the nonce: browser_eval("document.querySelector('#_wpnonce')?.value || document.querySelector('input[name*=\"nonce\"]')?.value").
  4. Bypass Check: If the vulnerability is purely in the display of a GET parameter (e.g., a "error" message displayed regardless of the action's success), no nonce is needed.

5. Exploitation Strategy

We will attempt to trigger the XSS by injecting a script into common "message" parameters.

Step 1: Discover the Vulnerable Parameter

We will test common parameters used by plugins to display reflected feedback.

  • Target URL: /wp-admin/options-general.php?page=wp-mail
  • Payloads to test:
    1. &message=<script>alert(document.domain)</script>
    2. &error=<img src=x onerror=alert(1)>
    3. &s="><script>alert(1)</script>

Step 2: Execution via http_request

// Example request to trigger reflection
await http_request({
  url: "http://localhost:8080/wp-admin/options-general.php?page=wp-mail&message=%3Cscript%3Ealert(document.domain)%3C/script%3E",
  method: "GET",
  headers: {
    "Cookie": "admin_session_cookie_here" // The agent uses browser_navigate for UI-based XSS
  }
});

Step 3: Proof of Concept via Browser

The most effective way to prove XSS is using the browser_navigate and browser_eval tools to catch the alert or verify the DOM.

  1. Navigate to the URL: browser_navigate("/wp-admin/options-general.php?page=wp-mail&message=<script>console.log('CVE-2025-68008_EXPLOITED')</script>").
  2. Check for payload in source: browser_eval("document.body.innerHTML.includes('CVE-2025-68008_EXPLOITED')").

6. Test Data Setup

  1. Install Plugin: wp plugin install wp-mail --version=1.3 --activate
  2. Admin User: Ensure an admin user exists (default in test environments).
  3. Configuration: No specific configuration of the plugin is likely required as the vulnerability exists in the display logic.

7. Expected Results

  • The HTTP response should contain the raw, unescaped payload: <script>alert(document.domain)</script>.
  • When viewed in a browser, the JavaScript should execute.
  • In the browser_navigate session, a console.log or a specific DOM element created by the script should be detectable.

8. Verification Steps

  1. Check for Sanitize Functions: Use WP-CLI to inspect the source code for the sink:
    grep -rn "echo \$_GET" wp-content/plugins/wp-mail/
    grep -rn "echo \$_REQUEST" wp-content/plugins/wp-mail/
  2. Verify Unescaped Output: Use http_request to fetch the page and check if the string matches exactly without HTML entities (e.g., < instead of &lt;).

9. Alternative Approaches

  • Attribute Injection: If the input is reflected inside an attribute (e.g., value="<?php echo $_GET['val']; ?>"), use a payload to break out: " autofocus onfocus="alert(1).
  • Post-Method Reflection: If the plugin reflects values from a POST request (e.g., after a failed validation), use the http_request tool to send a POST with the payload and check the resulting body.
  • Public Side: Check if the plugin registers any shortcodes that reflect parameters (e.g., a contact form that echoes back the user's name on "Thank You" pages). Use grep -r "add_shortcode" wp-content/plugins/wp-mail/ to find them.
Research Findings
Static analysis — not yet PoC-verified

Summary

The WP Mail plugin for WordPress (versions <= 1.3) is vulnerable to Reflected Cross-Site Scripting (XSS). This vulnerability occurs because the plugin's administrative settings pages echo user-supplied input from URL parameters directly into the HTML response without sufficient sanitization or output escaping.

Vulnerable Code

// Inferred from research plan logic in wp-mail/wp-mail.php

if (isset($_GET['message'])) {
    echo '<div class="updated"><p>' . $_GET['message'] . '</p></div>';
}

---

// Alternative common pattern for error display
if (isset($_GET['error'])) {
    echo '<div class="error"><p>' . $_GET['error'] . '</p></div>';
}

Security Fix

--- wp-content/plugins/wp-mail/wp-mail.php
+++ wp-content/plugins/wp-mail/wp-mail.php
@@ -X,Y +X,Y @@
-if (isset($_GET['message'])) {
-    echo '<div class="updated"><p>' . $_GET['message'] . '</p></div>';
-}
+if (isset($_GET['message'])) {
+    echo '<div class="updated"><p>' . esc_html(sanitize_text_field($_GET['message'])) . '</p></div>';
+}

Exploit Outline

The exploit targets the plugin's administration dashboard, specifically the settings page usually located at wp-admin/options-general.php?page=wp-mail. An attacker constructs a malicious URL that includes a script payload in a commonly reflected parameter such as 'message', 'error', or 'status'. For example: /wp-admin/options-general.php?page=wp-mail&message=<script>alert(document.domain)</script>. The attacker then tricks a logged-in administrator into clicking this link via social engineering. Because the plugin does not use esc_html() before echoing the value of the parameter, the script executes in the context of the administrator's session, potentially allowing for session hijacking or unauthorized administrative actions.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.