Review Map by RevuKangaroo <= 1.7 - Authenticated (Administrator+) Stored Cross-Site Scripting via Plugin Settings
Description
The Review Map by RevuKangaroo plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin settings in all versions up to, and including, 1.7 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with administrator-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This only affects multi-site installations and installations where unfiltered_html has been disabled.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=1.7# Research Plan: CVE-2024-4161 - Review Map by RevuKangaroo Stored XSS ## 1. Vulnerability Summary The **Review Map by RevuKangaroo** plugin (versions <= 1.7) contains a stored cross-site scripting (XSS) vulnerability. The flaw exists because the plugin fails to sanitize or escape user-supplied inp…
Show full research plan
Research Plan: CVE-2024-4161 - Review Map by RevuKangaroo Stored XSS
1. Vulnerability Summary
The Review Map by RevuKangaroo plugin (versions <= 1.7) contains a stored cross-site scripting (XSS) vulnerability. The flaw exists because the plugin fails to sanitize or escape user-supplied input when saving and displaying its settings.
While the vulnerability requires Administrator+ privileges, it is significant in WordPress Multisite environments or installations where the unfiltered_html capability is disabled for administrators (e.g., by the DISALLOW_UNFILTERED_HTML constant). In these contexts, an administrator is restricted from using dangerous HTML, but this plugin provides a bypass by incorrectly handling setting updates.
2. Attack Vector Analysis
- Vulnerable Endpoint: Plugin settings page, typically located at
/wp-admin/admin.php?page=review-map-settings(inferred) or via the WordPress Settings API at/wp-admin/options.php. - HTTP Parameter: Specific setting fields (e.g., API keys, map titles, or custom CSS fields) saved in the
wp_optionstable. - Authentication: Required (Administrator or Super Admin).
- Preconditions:
- Plugin installed and active.
unfiltered_htmlcapability must be disabled (standard for non-Super Admins on Multisite).
3. Code Flow (Inferred)
- Entry Point: The administrator navigates to the Review Map settings page.
- Input: The admin enters a payload (e.g.,
<script>alert(1)</script>) into a configuration field and submits the form. - Processing: The plugin likely uses
register_settingor a customadmin_inithook to process thePOSTrequest. It fails to applysanitize_text_field()orwp_kses()before callingupdate_option(). - Storage: The payload is stored raw in the database (
wp_options). - Sink: When the map is rendered (via shortcode on the frontend or on the settings preview), the plugin retrieves the value using
get_option()and echoes it directly without usingesc_html(),esc_attr(), orwp_kses().
4. Nonce Acquisition Strategy
The plugin likely uses the WordPress Settings API or a standard admin form with a CSRF nonce.
- Identify the Page: Use
wp-clito find the settings page slug:wp admin-menu list | grep "Review Map" - Navigate: Use
browser_navigateto visit the settings page. - Extract Nonce and Fields: Use
browser_evalto inspect the form.// Common patterns for Settings API or custom forms (() => { return { nonce: document.querySelector('input[name="_wpnonce"]')?.value, action: document.querySelector('form')?.action, option_page: document.querySelector('input[name="option_page"]')?.value, fields: Array.from(document.querySelectorAll('input[type="text"], textarea')).map(i => i.name) }; })() - Note: If the plugin uses
options.php, the nonce action is usually${option_group}-options.
5. Exploitation Strategy
Step 1: Discover Input Fields
Access the settings page and identify which fields are available for modification.
- URL:
/wp-admin/admin.php?page=review-map-settings(inferred)
Step 2: Inject Payload
Perform a POST request to update the settings with the XSS payload.
Note: We assume the plugin uses the standard options.php route.
- Method: POST
- URL:
http://vulnerable-site.local/wp-admin/options.php - Content-Type:
application/x-www-form-urlencoded - Payload:
option_page=review_map_settings_group& action=update& _wpnonce=[EXTRACTED_NONCE]& review_map_api_key=<script>alert(document.domain)</script>& submit=Save+Settings
Step 3: Trigger Execution
Identify where the setting is reflected. This is typically on the frontend where the map is displayed.
- Create a post with the plugin's shortcode.
- Visit the post as any user.
6. Test Data Setup
- Install Plugin: Ensure Review Map by RevuKangaroo <= 1.7 is active.
- Restrict Capabilities: Add
define( 'DISALLOW_UNFILTERED_HTML', true );towp-config.phpto simulate the vulnerable environment for the Admin user. - Create Target Page:
wp post create --post_type=page --post_title="Review Map Page" --post_status=publish --post_content='[revukangaroo_map]'(Shortcode inferred from plugin name). - Create Admin:
wp user create attacker admin@example.com --role=administrator --user_pass=password
7. Expected Results
- The settings update should succeed.
- Navigating to the page containing the shortcode (or returning to the settings page) should trigger a JavaScript alert box, confirming the payload was stored and executed without escaping.
8. Verification Steps
- Check Database: Verify the payload is stored raw.
wp option get review_map_api_key(inferred option name). - Check Frontend Source:
Usehttp_requestto fetch the frontend page and grep for the raw payload.grep "<script>alert(document.domain)</script>" response_body.html
9. Alternative Approaches
If the plugin does not use options.php:
- Custom AJAX: Check for
wp_ajax_hooks in the code. If found, useadmin-ajax.phpwith the appropriateactionandnonce. - Custom Admin Post: Look for
admin_posthooks and send the request toadmin-post.php. - Frontend Reflected: If the settings page itself reflects the value immediately after saving, the XSS will trigger in the Admin's own browser first.
Summary
The Review Map by RevuKangaroo plugin for WordPress is vulnerable to Stored Cross-Site Scripting via its settings page in versions up to 1.7. This allows authenticated administrators to inject arbitrary JavaScript because the plugin fails to sanitize input and escape output of configuration fields. This vulnerability primarily affects WordPress Multisite environments or installations where administrators have the 'unfiltered_html' capability disabled.
Exploit Outline
1. Authenticate as an Administrator or higher on a site where unfiltered_html is restricted (e.g., a WordPress Multisite instance). 2. Navigate to the Review Map settings page (likely located at /wp-admin/admin.php?page=review-map-settings). 3. Locate a configuration field, such as an API key or title field, and input a JavaScript payload (e.g., <script>alert(document.domain)</script>). 4. Submit the settings form to save the payload into the site's options table. 5. Trigger the payload by visiting the frontend page where the plugin's shortcode ([revukangaroo_map]) is used, or by revisiting the settings page.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.