Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-22640 Overview
CVE-2025-22640 is a stored Cross-Site Scripting (XSS) vulnerability in the Paytm Payment Donation WordPress plugin (paytm-donation) by integrationdevpaytm. The flaw affects all plugin versions up to and including 2.3.3. An authenticated attacker with high privileges can inject malicious script content that persists in the application and executes in the browsers of users who view the affected pages. The weakness is tracked as CWE-79, Improper Neutralization of Input During Web Page Generation.
Critical Impact
Stored XSS enables attackers to run arbitrary JavaScript in victim browsers, hijack administrator sessions, modify donation page content, and pivot to further WordPress compromise.
Affected Products
- integrationdevpaytm Paytm Payment Donation plugin for WordPress
- All plugin versions from n/a through 2.3.3
- WordPress sites running the vulnerable paytm-donation plugin
Discovery Timeline
- 2025-03-27 - CVE-2025-22640 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-22640
Vulnerability Analysis
The vulnerability resides in the Paytm Payment Donation plugin's handling of user-supplied input rendered into donation pages or administrative views. The plugin fails to properly neutralize HTML and JavaScript metacharacters before writing attacker-controlled values into the generated web page. Because the payload is persisted server-side, it executes each time a visitor or administrator loads the affected page.
Exploitation requires an authenticated user with elevated privileges and some user interaction on the victim side. Successful attacks can lead to session theft, forced actions in the WordPress administrative interface, defacement of donation workflows, and redirection of donors to attacker-controlled destinations.
Root Cause
The root cause is missing or insufficient output encoding of input fields exposed by the paytm-donation plugin. User-controlled strings are stored in the WordPress database and later echoed into HTML contexts without applying functions such as esc_html(), esc_attr(), or wp_kses(). This violates the WordPress plugin security guidance for escaping late and escaping often.
Attack Vector
The attack vector is network-based. A privileged user injects a JavaScript payload through a plugin input field accepting unsanitized text. The payload is persisted and later rendered to any user who loads the vulnerable view. Because the vulnerability has a changed scope, injected scripts can affect resources beyond the originally vulnerable component, including other WordPress administrative areas. See the Patchstack XSS Vulnerability Report for additional context.
Detection Methods for CVE-2025-22640
Indicators of Compromise
- Unexpected <script>, onerror=, onload=, or javascript: strings stored in wp_posts, wp_postmeta, or plugin-specific tables tied to paytm-donation.
- Donation pages rendering inline JavaScript that references external domains unrelated to Paytm infrastructure.
- Administrator sessions exhibiting unexpected outbound requests when visiting plugin configuration pages.
Detection Strategies
- Audit the WordPress database for persisted HTML or JavaScript inside Paytm Payment Donation plugin records.
- Review web server access logs for POST requests to plugin endpoints that include encoded script payloads or HTML entities.
- Compare installed plugin versions against the fixed release and flag any site running paytm-donation at version 2.3.3 or earlier.
Monitoring Recommendations
- Enable WordPress audit logging for plugin setting changes and donation form edits.
- Monitor browser-side Content Security Policy (CSP) violation reports from pages served by the plugin.
- Alert on new administrator or editor account creation events following plugin configuration changes.
How to Mitigate CVE-2025-22640
Immediate Actions Required
- Update the Paytm Payment Donation plugin to a version later than 2.3.3 once a patched release is available from the vendor.
- Restrict high-privileged WordPress roles to trusted administrators and enforce multi-factor authentication on those accounts.
- Review and sanitize existing donation page content for previously injected scripts.
Patch Information
No fixed version is confirmed in the NVD record at the time of publication. Monitor the Patchstack advisory and the plugin's WordPress.org page for a vendor-released patch superseding version 2.3.3.
Workarounds
- Deactivate and remove the paytm-donation plugin until a patched version is published.
- Deploy a Web Application Firewall (WAF) rule to block requests containing script tags or event-handler attributes targeting plugin endpoints.
- Apply a strict Content Security Policy that disallows inline scripts on pages rendered by the plugin.
# Configuration example: disable the vulnerable plugin via WP-CLI
wp plugin deactivate paytm-donation
wp plugin delete paytm-donation
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

