Salon Booking System – Free Version <= 10.30.24 - Unauthenticated Insecure Direct Object Reference
Description
The Salon Booking System – Free Version plugin for WordPress is vulnerable to Insecure Direct Object Reference in all versions up to, and including, 10.30.24 due to missing validation on a user controlled key. This makes it possible for unauthenticated attackers to perform unauthorized actions.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=10.30.24Source Code
WordPress.org SVNPatched version not available.
This research plan outlines the process for analyzing and exploiting **CVE-2026-40768**, an Insecure Direct Object Reference (IDOR) in the **Salon Booking System** plugin. ### 1. Vulnerability Summary The **Salon Booking System – Free Version** (up to 10.30.24) fails to adequately validate ownershi…
Show full research plan
This research plan outlines the process for analyzing and exploiting CVE-2026-40768, an Insecure Direct Object Reference (IDOR) in the Salon Booking System plugin.
1. Vulnerability Summary
The Salon Booking System – Free Version (up to 10.30.24) fails to adequately validate ownership or authorization when processing certain booking-related actions through unauthenticated AJAX endpoints. Specifically, the vulnerability allows an unauthenticated user to perform actions (likely cancellation or modification) on any booking record by supplying its ID, as the "user-controlled key" (token or ID) is not properly verified against the session or the specific object.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
sln_cancel_reservation(inferred primary target) or potentiallysln_update_booking_status. - Vulnerable Hooks:
wp_ajax_nopriv_sln_cancel_reservationorwp_ajax_nopriv_sln_booking_cancel. - Payload Parameter:
id(The booking ID) and potentially a dummy or missingtoken. - Authentication: Unauthenticated (No login required).
- Preconditions: A booking must exist in the system.
3. Code Flow
- The plugin registers unauthenticated AJAX handlers in its main initialization (likely in
src/SLN/Action/Ajax.phporsrc/SLN/Hook/Ajax.php). - An unauthenticated request triggers a callback such as
SLN_Action_Ajax_CancelReservation::execute()orsln_cancel_reservation(). - The code retrieves the booking ID from
$_POST['id']or$_GET['id']. - The Flaw: The code checks for the existence of a
tokenorkeyparameter but fails to verify that this token is cryptographically tied to that specificbooking_idor the current requester’s session. - The system calls
$booking->cancel()or updates the post status of the booking ID provided by the attacker.
4. Nonce Acquisition Strategy
While many nopriv actions in this plugin require a nonce for basic CSRF protection, the IDOR itself bypasses the logic intended to ensure the right user is acting on the right booking.
- Identify Trigger: The plugin enqueues its AJAX scripts on pages containing the booking form shortcode:
[salonbooking]. - Setup Page: Create a public page with the shortcode:
wp post create --post_type=page --post_status=publish --post_title="Booking" --post_content='[salonbooking]' - Navigate: Use
browser_navigateto visit the newly created page. - Extract Nonce: The plugin localizes its configuration in a global JS object.
- Inferred JS Variable:
SLN_JSorsalon_booking_vars. - Extraction Command:
browser_eval("window.SLN_JS?.nonce || window.salon_booking_vars?.nonce").
- Inferred JS Variable:
5. Exploitation Strategy
The goal is to cancel a booking belonging to another user (or a test booking) without possessing the legitimate secret token usually sent in confirmation emails.
Request Template:
- Method: POST
- URL:
http://<target>/wp-admin/admin-ajax.php - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
(Note: If aaction=sln_cancel_reservation&id=[TARGET_BOOKING_ID]&nonce=[EXTRACTED_NONCE]tokenparameter is required by the code but not validated, add&token=invalidor&token=).
Steps:
- Enumerate IDs: Determine a valid booking ID (e.g., ID 1, 2, or 100).
- Send Request: Execute the
http_requesttool with the parameters above. - Analyze Response: A successful exploit will typically return a JSON response:
{"status":"success"}or1.
6. Test Data Setup
- Install Plugin: Ensure
salon-booking-systemversion10.30.24is active. - Create a Booking:
- Use the
wp post createcommand to create asln_bookingpost type entry (the internal post type name might besln_reservationorbooking- verify withwp post-type list). - Alternatively, use the frontend booking form to create a "target" booking.
- Use the
- Verify Target: Note the ID of the created booking:
wp post list --post_type=sln_booking.
7. Expected Results
- Successful Exploitation: The booking status in the database changes from
confirmedorpendingtocancelled. - Response Content: The AJAX endpoint returns a success indicator without requiring the unique per-booking token that is normally required for guest cancellations.
8. Verification Steps
- Check Post Status:
wp post get [TARGET_BOOKING_ID] --field=post_status
(Expected:cancelledor the plugin's internal equivalent). - Check Meta:
wp post meta get [TARGET_BOOKING_ID] status
(The plugin often stores its own status in meta).
9. Alternative Approaches
If sln_cancel_reservation is not the vulnerable action, investigate:
sln_get_booking_details: Check if it allows unauthenticated viewing of customer names/emails/phones by IDOR.sln_save_customer_note: Check if an attacker can append notes to any booking ID.- Search for
wp_ajax_nopriv:grep -rn "wp_ajax_nopriv" .in the plugin directory to find all unauthenticated entry points and test each for anidorbooking_idparameter that lacks ownership verification.
Summary
The Salon Booking System plugin for WordPress is vulnerable to an unauthenticated Insecure Direct Object Reference (IDOR) in its AJAX handlers. This allows attackers to perform unauthorized actions, such as cancelling any booking, by providing a target booking ID without the system properly validating ownership or the associated secret token.
Exploit Outline
To exploit this vulnerability, an attacker first identifies a target booking ID. They then obtain a valid AJAX nonce by visiting a public page containing the [salonbooking] shortcode and extracting the 'nonce' value from the 'SLN_JS' or 'salon_booking_vars' JavaScript object. Finally, they send an unauthenticated POST request to /wp-admin/admin-ajax.php with the action 'sln_cancel_reservation', the target booking 'id', and the nonce. The server performs the action because it fails to verify that the provided (or missing) token matches the specific booking.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.