GHSA-8hm4-r66f-29wr Easy!Appointments: Authorization bypass in Google OAuth provider binding lets any backend user rebind a peer provider's Google sync
Summary`Google::oauth` at `application/controllers/Google.php:278` stores its URL-supplied `provider_id` in the session, and `oauth_callback` saves the issued Google OAuth token against that row without checking the caller owns the provider. Any logged-in backend user (admin, provider, or secretary) rebinds a peer provider's Google sync to a Google account they control. The peer's appointments then sync into the attacker's calendar with each customer's name and email attached as attendee data.PreconditionsAttacker holds a backend login on the target instance (admin, provider, or secretary). The customer role cannot log in.The instance has Google Calendar OAuth configured at `application/config/google.php` - i.e. any deployment that uses the Google sync feature at all.Default deployment per the project's own `docker-compose.yml`; no non-default flags required.DetailsThe same controller already carries the right gate on every other sync-management entry. `select_google_calendar` at `application/controllers/Google.php:389` and `disable_provider_sync` at `application/controllers/Google.php:423` both refuse the call when the caller is neither an admin nor the provider themselves:`oauth` and `oauth_callback` skip that check. Once the callback runs with `oauth_provider_id` pointing at a peer provider, the peer's `user_settings` row is overwritten with the attacker's OAuth token and `google_sync` is forcibly enabled.The attack chain that delivers the data:`Synchronization::sync_appointment_saved` at `application/libraries/Synchronization.php:51` runs on every booking save. The path includes the unauthenticated public booking flow (`Booking::register` at `application/controllers/Booking.php:463`) and the backend save (`Calendar::save_appointment` at `application/controllers/Calendar.php:306`). When `$provider['settings']['google_sync']` is truthy the handler reads `google_token` from the row - now the attacker's - refreshes it, and calls `Google_sync::add_appointment`.`Google_sync::add_appointment` at `application/libraries/Google_sync.php:184-189` adds the customer as a Google calendar attendee with their first name, last name, and email.The cron-triggered `Console::sync` -> `Google::sync($provider_id)` at `application/controllers/Google.php:44` walks the existing `sync_past_days` and `sync_future_days` windows and pushes every appointment to the attacker's calendar.The same loop deletes the local row whenever the remote event throws or is `cancelled` (`application/controllers/Google.php:186-191`); the attacker rolls events out of their Google calendar to delete the victim provider's appointments. Events the attacker creates in their own calendar arrive as unavailability records on the victim's schedule (`application/controllers/Google.php:209-254`).Proof of concept**Setup**Clone the repository, pin to the audited release, copy the sample config, and bring up the bundled stack:Run the console installer. The seed sets administrator's password to the literal string `administrator` (see `application/libraries/Instance.php:99`):Configure the install's Google OAuth client. Paste the client id and secret from a Google Cloud project you control into `application/config/google.php` and add `http://localhost/index.php/google/oauth_callback` to the project's authorized redirect URIs. This step is already done on any deployment that uses Google sync.Log in as `administrator` and persist the cookie jar (the project's session cookie is `ea_session`):Create the attacker provider (the default `require_phone_number=1` setting makes that field mandatory). Capture both ids:Log in as the attacker provider into a dedicated cookie jar:**Exploit**The attacker, logged in as a regular provider with id `$ATTACKER_ID`, points `/google/oauth/` at the victim provider's id `$VICTIM_ID`:Expected: `HTTP/1.1 302 Found` with `Location: https://accounts.google.com/o/oauth2/auth?...` - the server accepted the call from a non-owning caller. Verify the session-side effect on disk: `docker compose exec -T php-fpm cat storage/sessions/ea_session$(awk '$6=="ea_session"{print $7}' $ATTACKER_JAR)` shows `oauth_provider_id|s:1:"<VICTIM_ID>"` appended to the attacker's session data alongside their own `user_id|i:<ATTACKER_ID>`.The attacker copies the `ea_session` cookie from `$ATTACKER_JAR` into a real browser, opens the redirect URL, signs in to Google with their own Google account, and grants consent. Google redirects back to `http://localhost/index.php/google/oauth_callback?code=...` and the app exchanges the code for an access + refresh token.Confirm the row was rebound. The token, sync flag, and calendar selection now belong to the attacker's Google account but sit on the victim's `ea_user_settings`:Expected: `google_sync = 1`, `google_token = {"access_token":"...","refresh_token":"..."}` (attacker's), `google_calendar = primary`.Trigger a sync. Any unauthenticated booking against the victim provider now lands in the attacker's calendar:Expected: the attacker's Google calendar receives a new event whose title is the service name, with `Carol Victim <carol@target.test>` listed as an attendee.Impact**Confidentiality:** Reads every appointment booked against the victim provider; the customer's first name, last name, and email attach to each Google calendar event as attendee data (`Google_sync.php:184-189`).**Integrity:** Deletes any of the victim provider's appointments by removing the matching event from the attacker's calendar; the next `Console::sync` removes the local row (`Google.php:186-191`).**Integrity:** Inserts arbitrary unavailability records onto the victim provider's schedule by creating events in the attacker's calendar (`Google.php:209-254`).Suggestions to fix_This has not been tested - it is illustrative only._Reject the call unless the caller is an admin or the provider whose row is about to be rewritten - the same gate `select_google_calendar` and `disable_provider_sync` already use.CreditDredsen, 2026.
CVSS v3.1 score: 3.1