Hacking Google Calendar
Google Calendar had CSRF vulnerabilities where CSRF tokens were not validated, allowing an attacker to add arbitrary events or change calendar privacy settings via crafted requests.
nealpoole.com
Published on nealpoole.com
Category: Vulnerability Writeups / Tag: csrf, google, google calendar, google vulnerability reward program, security, web application security /
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to validate CSRF tokens on state-changing requests, allowing requests without a valid token to succeed.
Impact
An attacker could add arbitrary events to a victim's calendar or change the privacy settings of a calendar, potentially exposing or modifying calendar data.
What the attacker needed
Victim is logged into Google Calendar; attacker knows victim's email; victim visits a crafted URL or page
The fix
The vulnerabilities were fixed by ensuring CSRF tokens are validated.
How it was found
- Identify the target's email address.
- Register a Gmail account with a first letter different from the target's.
- Sign in to Google Calendar as the attacker and view the printable image version of the calendar.
- Brute-force the src parameter by trying permutations of letters/numbers in the first few characters.
- Determine the correct src value that matches the target's email.
- Send a POST request to the editcaldetails endpoint with the valid src and other parameters, omitting the CSRF token.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
CSRF (Cross-Site Request Forgery) is when a malicious website makes a user's browser send a request to another site where the user is logged in, without the user's knowledge. Here, Google Calendar did not check a secret token that should have prevented such requests, so an attacker could trick a user into adding events or changing settings.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.