Skip to content

feat(cves): add CVE-2025-5947 - Service Finder Bookings Auth Bypass#15656

Merged
DhiyaneshGeek merged 6 commits intoprojectdiscovery:mainfrom
sedat4ras:feat/add-cve-2025-5947
Mar 31, 2026
Merged

feat(cves): add CVE-2025-5947 - Service Finder Bookings Auth Bypass#15656
DhiyaneshGeek merged 6 commits intoprojectdiscovery:mainfrom
sedat4ras:feat/add-cve-2025-5947

Conversation

@sedat4ras
Copy link
Copy Markdown
Contributor

PR Information

Vulnerability Summary

The service_finder_switch_back() AJAX action in the Service Finder Bookings plugin fails to validate the original_user_id cookie before switching user context. An unauthenticated attacker can set Cookie: original_user_id=1 and call the action to gain admin-level access.

  • CVSS: 9.8 (Critical)
  • CWE: CWE-639 (Authorization Bypass Through User-Controlled Key)
  • Affected: All versions <= 6.0
  • Patched: Version 6.1 (released July 17, 2025)
  • Actively exploited: 13,800+ attempts blocked by Wordfence on disclosure day

Template Logic

  1. First request confirms the plugin is installed by checking readme.txt
  2. Second request attempts the bypass: GET /wp-admin/admin-ajax.php?action=service_finder_switch_back with Cookie: original_user_id=1
  3. Matches on a 301/302 redirect to wp-admin (not wp-login.php) indicating successful user context switch

Template validation

  • Validated with a host running a vulnerable version and/or configuration (True Positive)
  • Validated with a host running a patched version and/or configuration (avoid False Positive)

Note: I was unable to test against a live vulnerable instance. Happy to refine matchers with feedback from the team or community members who can verify against a real target.

Additional Details

  • Shodan query: http.html:"sf-booking"
  • PublicWWW query: /wp-content/plugins/sf-booking/

Add detection template for critical authentication bypass vulnerability
in the Service Finder Bookings WordPress plugin (<= 6.0).

The service_finder_switch_back() AJAX action fails to validate the
original_user_id cookie, allowing unauthenticated attackers to impersonate
any user including administrators. Actively exploited in the wild with
13,800+ attempts recorded by Wordfence on disclosure day.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@neo-by-projectdiscovery-dev
Copy link
Copy Markdown

neo-by-projectdiscovery-dev bot commented Mar 23, 2026

Neo - Nuclei Template Review

No security issues found

3 issues fixed in this PR

Hardening Notes
  • The verified: true flag is still missing from metadata. As noted in PR description, author could not test against a live vulnerable instance. Community verification is needed before merging.
  • Template was simplified from two-stage (plugin-check + exploit-check) to single-request approach. This may attempt the exploit on any WordPress site, but the specific matchers (Location header + session cookie) should prevent false positives.
  • Removed CPE classification field and extractors section - these are optional enhancements but not required for template functionality.

Comment @pdneo help for available commands. · Open in Neo

- Use regex on Location header instead of broad word match to prevent
  false positives from other headers (Cookie, Referer, etc.)
- Add wordpress_logged_in_ cookie matcher to confirm session was actually
  created, not just a redirect occurred
@sedat4ras
Copy link
Copy Markdown
Contributor Author

Hi @DhiyaneshGeek,

Thanks for the review via Neo. Here's a quick update on the findings:

Fixed:

  • ✅ Replaced broad header matcher with specific Location header regex: (?i)Location:.*\/wp-admin\/
  • ✅ Added wordpress_logged_in_ cookie matcher for stronger authentication verification

Pending:

  • verified: true — I don't have access to a live vulnerable instance (Service Finder Bookings ≤6.0). Happy to add this flag if someone from the community can verify, or if you'd like to test internally.

Let me know if any further changes are needed!

@theamanrawat
Copy link
Copy Markdown
Contributor

Hi @sedat4ras,

Thank you so much for sharing this template with the community and contributing to this project 🍻

We tried to reproduce the POC, but it didn't work on our end. If you believe the template is correct, please send a vulnerable lab environment to templates@projectdiscovery.io.

@sedat4ras
Copy link
Copy Markdown
Contributor Author

Hi @theamanrawat,

Thanks for testing! I think I found why reproduction failed.

Root cause: The wordpress_logged_in_ cookie matcher is likely causing a false negative. In this specific attack vector, the exploit works via cookie spoofing — the attacker sends original_user_id=1 in the request cookie, and service_finder_switch_back() switches the context without proper validation. WordPress then redirects to /wp-admin/ but does not necessarily set a new wordpress_logged_in_ session cookie in the response (since the session isn't being created fresh — the function just switches context and redirects).

So the matchers-condition: and is too strict: the third matcher (Set-Cookie check) will never match in this unauthenticated scenario, making the template always return a false negative on real targets.

Proposed fix: Remove the wordpress_logged_in_ matcher and rely on the 301/302 redirect to /wp-admin/ as the confirmation signal — consistent with how the PoC at https://github.com/M4rgs/CVE-2025-5947_Exploit works.

Would you like me to push this change? Happy to update the template if this aligns with your assessment.

Copy link
Copy Markdown

@codeCraft-Ritik codeCraft-Ritik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent improvement

@theamanrawat theamanrawat added Done Ready to merge and removed waiting for more info labels Mar 30, 2026
sedat4ras and others added 2 commits March 30, 2026 21:17
The Set-Cookie matcher was causing false negatives. In this auth bypass,
the exploit triggers a redirect to /wp-admin/ without setting a new
session cookie. Relying solely on the Location header redirect is the
correct signal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DhiyaneshGeek DhiyaneshGeek merged commit 35bbed6 into projectdiscovery:main Mar 31, 2026
3 checks passed
@sedat4ras sedat4ras deleted the feat/add-cve-2025-5947 branch April 2, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Done Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants