WP Google Review Slider <= 18.1 - Reflected Cross-Site Scripting via 'place' Parameter
Description
The Wp Google Places Review Slider plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the 'place' parameter in versions up to, and including, 18.1. This is due to insufficient input sanitization and output escaping in admin/partials/googlecrawl_dfs.php, where the $_GET['place'] value is URL-decoded, stripslashes()'d, and echoed directly into an HTML value attribute with no esc_attr() call when the supplied place is not already a stored key in the wprev_google_crawls option. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a specially crafted link.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NTechnical Details
<=18.1What Changed in the Fix
Changes introduced in v18.2
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-13015 (WP Google Review Slider) ## 1. Vulnerability Summary The **WP Google Review Slider** plugin (versions <= 18.1) is vulnerable to **Reflected Cross-Site Scripting (XSS)**. The vulnerability exists in `admin/partials/googlecrawl_dfs.php`, where the `place`…
Show full research plan
Exploitation Research Plan: CVE-2026-13015 (WP Google Review Slider)
1. Vulnerability Summary
The WP Google Review Slider plugin (versions <= 18.1) is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability exists in admin/partials/googlecrawl_dfs.php, where the place GET parameter is double-decoded and echoed into the value attribute of an HTML input field without proper attribute escaping. Although the file is within the admin directory and requires manage_options capabilities to view, an unauthenticated attacker can exploit this by tricking a logged-in administrator into clicking a malicious link.
2. Attack Vector Analysis
- Target Endpoint: WordPress Admin Dashboard
- Vulnerable File:
admin/partials/googlecrawl_dfs.php - Vulnerable Page Slug: Likely
wp-google-review-slider-google-crawl(to be confirmed by searching foradd_menu_pageor inclusion ofgooglecrawl_dfs.php). - Vulnerable Parameter:
place(via$_GET) - Authentication Requirement:
- Attacker: Unauthenticated (to craft and send the link).
- Victim: Authenticated Administrator (with
manage_optionscapability).
- Preconditions: The plugin must be active. The vulnerability triggers when the provided
placeis not found in the existingwprev_google_crawlsoption.
3. Code Flow
- Entry Point: The administrator visits the plugin's admin page (e.g.,
wp-admin/admin.php?page=wp-google-review-slider-google-crawl&place=[PAYLOAD]). - Capability Check:
googlecrawl_dfs.php(Line 13) checkscurrent_user_can('manage_options'). - Source:
$_GET['place']is retrieved and explicitly passed throughurldecode()(Line 17), creating a double-decoding scenario since PHP auto-decodes$_GETonce.$currentplace = ""; if(isset($_GET['place'])){ $currentplace = urldecode($_GET['place']); } - Logic Branch: The code checks if
$currentplaceexists in thewprev_google_crawlsoption (Lines 34-40). If it does not exist, it falls into theelse ifblock:} else if(!isset($googlecrawlsarray[$currentplace]['enteredidorterms'])){ $savedplaceid = stripslashes($currentplace); } - Sink: The raw
$savedplaceidis passed throughstripslashes()and echoed directly into thevalueattribute of the#gplaceidinput (Line 99).<input id="gplaceid" ... value="<?php echo stripslashes($savedplaceid); ?>" ...> - Injection: Since
esc_attr()is missing, an attacker can use"to break out of the attribute and inject tags like<script>or event handlers likeonerror.
4. Nonce Acquisition Strategy
No nonce is required for this reflected XSS.
Reflected XSS occurs during the rendering of a GET request. In WordPress, standard admin pages registered via add_menu_page perform capability checks but do not typically require a CSRF nonce just to view the page. The payload is executed immediately upon the administrator loading the page.
5. Exploitation Strategy
Step 1: Identify the Admin Page Slug
Use grep to find where googlecrawl_dfs.php is included to determine the exact page parameter.
grep -r "googlecrawl_dfs.php" .
Step 2: Craft the Payload
Because the code calls urldecode() on a value already decoded by PHP, we must use double URL encoding to ensure the payload survives and executes.
- Target Tag Breakout:
"><img src=x onerror=alert(document.domain)> - Encoding:
"->%22->%2522>->%3E->%253E<->%3C->%253C
- Full Payload:
place=%2522%253E%253Cimg%2520src%253Dx%2520onerror%253Dalert(document.domain)%253E
Step 3: Execution
The automated agent will simulate an administrator session and navigate to the crafted URL using the browser_navigate tool.
Example Request:
- URL:
http://localhost:8080/wp-admin/admin.php?page=[SLUG]&place=%2522%253E%253Cimg%2520src%253Dx%2520onerror%253Dalert(document.domain)%253E
6. Test Data Setup
- Install and activate WP Google Review Slider version 18.1.
- Create an administrator user.
- Ensure no existing crawl data for the payload exists (standard on a fresh install).
7. Expected Results
- When the administrator navigates to the URL, the HTML source at the vulnerable input will look like:
<input id="gplaceid" ... value=""><img src=x onerror=alert(document.domain)>" ...> - The browser will execute the
onerrorhandler, triggering a JavaScript alert containing the site's domain.
8. Verification Steps
- Browser Verification: Use
browser_evalto check if a global variable set by the payload (e.g.,window.pwned = 1) exists, or observe the alert. - Source Verification: Use
http_requestas an admin to fetch the page and verify that theplaceparameter's content appears unescaped in the response body.# Check for the injected tag in the raw HTML grep "<img src=x onerror=alert(document.domain)>"
9. Alternative Approaches
- Bypassing
stripslashes: If the environment hasmagic_quotesstyle behavior (unlikely in modern PHP but possible via other plugins), useString.fromCharCodefor the JS payload to avoid quotes. - Tab Switching: If the DFS page is not the default, check if
googlecrawl.php(the other partial) has similar vulnerabilities. (Note:admin/partials/googlecrawl.phpLine 63 usesesc_attr(stripslashes($savedplaceid)), indicating it is not vulnerable, highlighting the specific omission ingooglecrawl_dfs.php).
Summary
The WP Google Review Slider plugin is vulnerable to Reflected Cross-Site Scripting (XSS) via the 'place' parameter in the 'googlecrawl_dfs.php' admin partial. This occurs because the plugin double-decodes the user-provided input and echoes it directly into an HTML attribute without proper sanitization or escaping, allowing attackers to execute arbitrary JavaScript in the context of an administrator's browser.
Vulnerable Code
// admin/partials/googlecrawl_dfs.php line 17 if(isset($_GET['place'])){ $currentplace = urldecode($_GET['place']); } --- // admin/partials/googlecrawl_dfs.php line 40 } else if(!isset($googlecrawlsarray[$currentplace]['enteredidorterms'])){ // Handle case where we only have nhful and no other data - use the key as place ID $savedplaceid = stripslashes($currentplace); } --- // admin/partials/googlecrawl_dfs.php line 106 <input id="gplaceid" style="width: 300px;" value="<?php echo stripslashes($savedplaceid); ?>" class="w3-input w3-border w3-round" type="text" placeholder="e.g.: ChIJOUW7JL0RYogRgDxol-LP_sU">
Security Fix
@@ -18,14 +18,14 @@ } $currentplace = ""; - if(isset($_GET['place'])){ - $currentplace = urldecode($_GET['place']); + if ( isset( $_GET['place'] ) ) { + $currentplace = sanitize_text_field( wp_unslash( urldecode( $_GET['place'] ) ) ); } $editid=""; $editplace =""; - if(isset($_GET['ract']) && $_GET['ract']=="edit"){ + if ( isset( $_GET['ract'] ) && 'edit' === sanitize_text_field( wp_unslash( $_GET['ract'] ) ) ) { $editidedit="edit"; - $editplace = urldecode($_GET['place']); + $editplace = $currentplace; } $googlecrawlsarray = Array(); @@ -106,12 +106,12 @@ <h4>Google Search Terms or Place ID:</h4> </div> <div class=" w3-cell w3-cell-middle w3-padding-small"> - <input id="gplaceid" style="width: 300px;" value="<?php echo stripslashes($savedplaceid); ?>" class="w3-input w3-border w3-round" type="text" placeholder="e.g.: ChIJOUW7JL0RYogRgDxol-LP_sU"> + <input id="gplaceid" style="width: 300px;" value="<?php echo esc_attr( stripslashes( $savedplaceid ) ); ?>" class="w3-input w3-border w3-round" type="text" placeholder="e.g.: ChIJOUW7JL0RYogRgDxol-LP_sU">
Exploit Outline
An attacker crafts a malicious URL targeting the plugin's 'Connect Google Review Page' in the WordPress admin dashboard (e.g., /wp-admin/admin.php?page=wp-google-review-slider-google-crawl). The 'place' parameter is populated with a double-URL-encoded payload designed to break out of an HTML input tag (e.g., ">%2522%253E%253Cscript%253Ealert(1)%253C/script%253E"). When an authenticated administrator clicks this link, the PHP code in googlecrawl_dfs.php decodes the value and echoes it unescaped into the 'value' attribute of the #gplaceid input field, causing the browser to execute the injected script.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.