Hijacking Google Calendar events and other missing access controls
contents 5 sections
Introduction
- User A creates an event that can’t be modified by guests.

- User B receives an invitation. The “more details” link leads to a URL like:
https://www.google.com/calendar/event?action=VIEW&eid=MW5hNm5hcnFzdm44ZnM4OGtwbDhrMjhzdTggZWNuZWxhZGlzQG0&tok=MjQjbWljaGFsLmEubWFyZWtAZ21haWwuY29tODQ0MzNmZDVlZTZiMTBkYzgzNjY5M2RlMzZkYzRlNTcyYzE4YzhjNg&ctz=Europe/Berlin&hl=en

which is accessible to users A and B, but inaccessible to any other Google user (let’s call them user C):

Viewing private events as an anonymous user
However, the first security issue is that it’s accessible to any anonymous (not logged-in) user:

Modifying responses of attendees
Furthermore, we can tamper with the eid parameter from the URL, which is Base64-encoded. So base64_to_text("MW5hNm5hcnFzdm44ZnM4OGtwbDhrMjhzdTggZWNuZWxhZGlzQG0") = "1na6narqsvn8fs88kpl8k28su8 ecneladis@m", where @m is short for @gmail.com.
The first part is common to every invited user, and I guess it’s a token unique to the given event. The second part identifies the current user. So we can modify it to text_to_base64("1na6narqsvn8fs88kpl8k28su8 jon.doe@gmail.com").
What's inside the link
Two parameters do the work. Both are Base64, and both decode to readable text.
1na6narqsvn8fs88kpl8k28su8the event, the same for every guest␣spaceecneladis@mthe guest (@m = @gmail.com)
tok
24#prefixm…@gmail.comthe guest's address84433fd5…2c18c8c640 hex digits, the length of a SHA-1 hashVoilà, we’re still not authenticated with Google, but we’re able to modify the reply status from the event creator’s context:

We can also perform other actions by impersonating the event’s creator and modifying the event for every invited person, or we can modify the event only for a specific person by specifying the proper email in the eid parameter. No cookies are needed; the only requirement is to tamper with the eid parameter. As mentioned before, the eid and tok parameters are available to every invited person - so they can easily bypass the authentication mechanism for the given events.

Hijacking events
In a similar fashion, from the context of user B, I was able to pass the eid parameter specific to an event managed by user A and transfer its ownership to user C.
Taking someone else's event
B is an ordinary guest, signed in as themselves. Nothing in the request below comes from A.

–

–

Summary
Who could do what
The event was set so that guests can't modify it. Red cells are where Calendar allowed more than that.
| action | meant for | actually possible for |
|---|---|---|
| View the event, signed in as a stranger (C) | nobody | nobody, correctly blocked |
| View the event | A and the guests | also anyone not signed in who has the link |
| Change a guest's response | that guest | anyone with the link, signed out, by rewriting eid |
| Edit the event, e.g. its title | A only | anyone with the link, signed out, acting as A |
| Transfer ownership | A only | guest B, using the eid of A's event |