CVE-2025-4579
Executive Summary
CVE-2025-4579 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the WP Content Security Plugin for WordPress, up to and including version 2.3. The flaw resides in the blocked-uri and effective-directive parameters, which are insufficiently sanitized and escaped. This allows unauthenticated attackers to inject arbitrary web scripts that execute when a user accesses a compromised page. The vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly.
The CVSS score is 7.2 (High), with a low EPSS probability (0.0%). No public exploit code or patch is currently available, making proactive detection and mitigation critical.
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. Since no patch exists, consider disabling the plugin until a fix is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 7.2 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must visit the injected page
- Scope: Changed (S:C) – impact extends beyond the vulnerable component
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – script injection possible
- Availability Impact: None (A:N)
Threat Level: High. Although user interaction is required, the attack is unauthenticated and can be automated to target multiple victims.
Deep Dive & Mechanics
The WP Content Security Plugin is designed to enforce Content Security Policy (CSP) headers. It logs blocked resources via the blocked-uri and effective-directive parameters. The vulnerability occurs because these parameters are stored in the database without proper sanitization and later rendered without escaping.
Attack Flow:
- An attacker sends a crafted HTTP request to a WordPress site with the vulnerable plugin active.
- The request includes malicious JavaScript in the
blocked-urioreffective-directiveparameter. - The plugin logs this input into the database.
- When an administrator or user views the plugin’s log page (e.g., via the admin dashboard), the stored script executes in their browser.
- The attacker can steal session cookies, redirect users, or perform actions on behalf of the victim.
Root Cause: Insufficient input validation and output escaping in the logging functionality.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the plugin’s logging handler. A typical vulnerable pattern might look like:
// Vulnerable code (conceptual)
$blocked_uri = $_GET['blocked-uri'];
$directive = $_GET['effective-directive'];
// Directly stored without sanitization
$wpdb->insert('csp_log', array('uri' => $blocked_uri, 'directive' => $directive));
A patched version would use esc_html() or htmlspecialchars() when outputting the data:
// Patched code (conceptual)
echo esc_html($row->uri);
echo esc_html($row->directive);
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with WP Content Security Plugin <= 2.3
- Access to a page that logs CSP violations (e.g., a custom endpoint)
Exploit Steps:
- Identify the logging endpoint (e.g.,
/wp-content/plugins/wp-content-security/log.php). - Send a crafted request with XSS payload:
GET /wp-content/plugins/wp-content-security/log.php?blocked-uri=<script>alert('XSS')</script>&effective-directive=script-src HTTP/1.1 Host: target.com - The payload is stored in the database.
- When an admin visits the plugin’s log page, the script executes.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual parameters in requests to the plugin’s endpoints.
- Use WAF rules to block common XSS patterns in
blocked-uriandeffective-directive.
Hardening:
- Disable the plugin until a patch is released.
- Implement CSP headers at the server level to mitigate XSS impact.
- Restrict access to the plugin’s admin pages via IP whitelisting.
Indicators of Compromise (IOCs)
- Network IOCs:
- Requests containing
<script>tags inblocked-urioreffective-directiveparameters. - Unusual user-agent strings targeting
/wp-content/plugins/wp-content-security/endpoints.
- Requests containing
- File IOCs:
- Modified plugin files (e.g.,
log.php) with injected code. - Suspicious entries in the WordPress
wp_csp_logtable.
- Modified plugin files (e.g.,
- Behavioral IOCs:
- Unexpected admin actions (e.g., new admin user creation) originating from the same IP as the XSS payload.
Detection Engineering
YARA Rule
rule CVE_2025_4579_XSS_Stored {
meta:
description = "Detects stored XSS payloads in WP Content Security Plugin logs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4579"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/i
$blocked_uri = "blocked-uri"
$effective_directive = "effective-directive"
condition:
all of them
}
Sigma Rule
title: Stored XSS via WP Content Security Plugin
id: cve-2025-4579
status: experimental
description: Detects attempts to exploit CVE-2025-4579 via stored XSS
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- "/wp-content/plugins/wp-content-security/"
cs-uri-query|contains:
- "blocked-uri="
- "effective-directive="
cs-uri-query|re: '<script[^>]*>.*?<\/script>'
condition: selection
falsepositives:
- Legitimate CSP violation logs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4579 Stored XSS Attempt"; flow:to_server; content:"/wp-content/plugins/wp-content-security/"; http_uri; content:"blocked-uri"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Review logs for signs of exploitation (e.g., unexpected script tags in CSP logs).
- Implement WAF rules to block XSS patterns in the vulnerable parameters.
Long-term Fix:
- Apply the vendor’s patch when available.
- Update to the latest version of the plugin (if patched).
- Conduct a security audit of all WordPress plugins.
Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence. For questions, contact threatintel@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.