MotoPress Hotel Booking <= 6.0.3 - Authenticated (Subscriber+) Information Exposure
Description
The MotoPress Hotel Booking plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 6.0.3. This makes it possible for authenticated attackers, with Subscriber-level access and above, to extract sensitive user or configuration data.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NTechnical Details
<=6.0.3What Changed in the Fix
Changes introduced in v6.0.4
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-57347 - MotoPress Hotel Booking Information Exposure ## 1. Vulnerability Summary The **MotoPress Hotel Booking** plugin (including the Lite version) is vulnerable to **Sensitive Information Exposure** via its REST API. In versions up to and including 6.0.3, th…
Show full research plan
Exploitation Research Plan: CVE-2026-57347 - MotoPress Hotel Booking Information Exposure
1. Vulnerability Summary
The MotoPress Hotel Booking plugin (including the Lite version) is vulnerable to Sensitive Information Exposure via its REST API. In versions up to and including 6.0.3, the REST API endpoints for managing "Booking Blocks" (rules that restrict dates or rooms) do not implement sufficient capability checks. This allows authenticated users with low-level privileges, such as Subscribers, to access internal booking rules, room configuration data, and potentially sensitive comments associated with date blocks.
The vulnerability resides in the controllers located in includes/advanced/api/controllers/v1/, specifically within the GetBlockController class, which lacks an adequately restrictive permission_callback.
2. Attack Vector Analysis
- Endpoint:
/wp-json/mphb/v1/booking_rules/blocks/(?P<block_id>[\d]+) - HTTP Method:
GET(for Information Exposure) - Authentication: Required (Subscriber role is sufficient).
- REST Namespace:
mphb/v1(inferred fromMPHB\Advanced\Api\Controllers\V1). - REST Route:
booking_rules/blocks/ - Payload: A valid
block_id(integer) passed in the URL. - Preconditions: At least one "Block" (booking rule) must exist in the system for exposure.
3. Code Flow
- Entry Point: The REST API server receives a request for
GET /wp-json/mphb/v1/booking_rules/blocks/{block_id}. - Controller Routing: The request is routed to
MPHB\Advanced\Api\Controllers\V1\GetBlockController. - Capability Check (The Vulnerability): The controller (via its parent
AbstractRestCommandController) uses apermission_callbackthat likely only checks if the user is logged in (is_user_logged_in()) or has a very low-level capability, rather than checking formanage_optionsoredit_posts. - Data Retrieval: The
process_and_get_data_by_response_schema( \WP_REST_Request $request )function is called. - Logic Path:
- It retrieves the
block_idvia$request->get_param( 'block_id' ). - It calls
MPHB()->getBlocksRepository()->getItem( $blockId ).
- It retrieves the
- Sink: The block data is returned as a JSON object, exposing properties like
comment,date_from,date_to,room_id, androom_type_id(defined inRestApiSchemaHelper::getBlockProperties()).
4. Nonce Acquisition Strategy
REST API requests in WordPress require a _wpnonce parameter or an X-WP-Nonce header when using cookie-based authentication. Since the attacker is a Subscriber, they can log into the WordPress dashboard and extract the global REST nonce.
- Login: Authenticate as a Subscriber user.
- Access Dashboard: Navigate to
/wp-admin/profile.php. - Extract Nonce: Use
browser_evalto extract the nonce from thewpApiSettingsobject which is standard in WordPress admin pages.- JS Command:
browser_eval("wpApiSettings.nonce")
- JS Command:
- Usage: Include this nonce in the
X-WP-Nonceheader of the subsequent API request.
5. Exploitation Strategy
Step 1: Data Discovery (Optional but recommended)
If specific block_id values are unknown, an attacker might try to list all blocks if a plural GetBlocksController exists (standard REST pattern). If not, they can brute-force IDs (e.g., 1, 2, 3).
Step 2: Extract Sensitive Data
Request:
- URL:
http://localhost:8080/wp-json/mphb/v1/booking_rules/blocks/1 - Method:
GET - Headers:
X-WP-Nonce: [EXTRACTED_NONCE]Content-Type: application/jsonCookie: [SUBSCRIBER_COOKIES]
Expected Vulnerable Response:
{
"block_id": 1,
"comment": "Internal Note: VIP guest, do not overbook. Customer phone: +123456789",
"date_from": "2024-12-01",
"date_to": "2024-12-10",
"room_id": 45,
"room_type_id": 10,
"has_restrictions": true
}
6. Test Data Setup
To verify the exposure, a "Block" must be created by an Admin:
- Log in as Admin.
- Go to Accommodation -> Booking Rules.
- Create a New Block (Restriction).
- Enter a sensitive comment:
Secret: Room maintenance needed for guest John Doe. - Note the ID of the created block (can be found in the database table
wp_mphb_blocksor by checking the URL in the admin UI). - Create a Subscriber user.
7. Expected Results
- Vulnerable: The Subscriber receives a
200 OKresponse with the full block object, including thecommentfield. - Fixed: The Subscriber receives a
403 Forbiddenor401 Unauthorizedresponse with a message indicating they lack permission to view this resource.
8. Verification Steps
- WP-CLI Verification: After the exploit, verify the data matches the database.
wp db query "SELECT * FROM wp_mphb_blocks WHERE block_id = 1;"
- Check Access Logs: Ensure the request was made by the Subscriber user ID.
9. Alternative Approaches
If GET access is blocked but the vulnerability title implies broader exposure, investigate:
POST /wp-json/mphb/v1/booking_rules/blocks: Creating a block as a Subscriber.DELETE /wp-json/mphb/v1/booking_rules/blocks/1: Deleting blocks as a Subscriber (DeleteBlockController).- Brute-forcing
block_idvalues using a script to dump the entirewp_mphb_blockstable via theGETendpoint.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.