Vulnerabilities / BuddyPress / WPSEC-2026-4026

BuddyPress <= 12.7.4 - Unauthenticated SQL Injection via 'relation' Key of 'xprofile' Members REST API Parameter

High 7.5 CWE-89Fixed in 12.7.5
ID
WPSEC-2026-4026
Plugin
BuddyPress (buddypress)
Affected
from 12.0.0 before 12.7.5
Remediation
Update to 12.7.5 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-89
Usage
Plugin Medium · Affected versions Low among sites WPSec scans, 2026-11-26
Attack surface
BuddyPress on WPSec AttackSurface
Fix released
Published

Description

The BuddyPress plugin for WordPress is vulnerable to SQL Injection via the 'relation' key of nested clauses in the 'xprofile' parameter of the members REST API endpoint (/buddypress/v1/members) in versions 12.0.0 up to, and including, 12.7.4, due to insufficient validation of the 'relation' value in BP_XProfile_Query (and the shared BP_Recursive_Query base class). A clause whose 'value' is an empty array was treated as a first-order clause during sanitization, so its 'relation' key was never checked, and once the empty value was removed the clause was processed as a nested query whose raw 'relation' string was concatenated into the SQL WHERE clause. This makes it possible for unauthenticated attackers to append additional SQL to an existing query and extract sensitive information from the database.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON, OSV or Markdown · All advisories: JSON, OSV, RSS

License: CC BY 4.0