Skip to content
CSRF Write-up Intermediate

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 author, on nealpoole.com

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

  1. Identify the target's email address.
  2. Register a Gmail account with a first letter different from the target's.
  3. Sign in to Google Calendar as the attacker and view the printable image version of the calendar.
  4. Brute-force the src parameter by trying permutations of letters/numbers in the first few characters.
  5. Determine the correct src value that matches the target's email.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.