Exploiting Google Calendars
Publicly shared Google Calendars exposed internal meeting links, documents, and livestream passwords. An attacker could access sensitive company information by enumerating employee email addresses and checking which calendars were public.
Published on sites.google.com
Calendars help us manage our everyday life into a more organized patterns. From work to school, we all had or have use calendars but what happens when our calendar is public and is inviting attackers to access sensitive company information?
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.
Context
Google Calendar lets a user share or embed a calendar so that other people can view it. The embed link takes the form of a URL with the calendar owner's email address in the src parameter, and the calendar's timezone in ctz. When a calendar is shared publicly, anyone who knows or guesses that email address can load the embed and read the events on it.
The research here looks at what happens when employees of large companies leave their work calendars public. The author started from a reconnaissance workshop at the Offensive Security Society, CSUF, where he noticed that many companies share this problem. The write-up is by Rojan Rijal (@uraniumhacker) and Brandon Nguyen (@cmdrsnuggle).
The information disclosed in the cases found included:
- Internal meetings: many companies hold remote meetings over video calls. Zoom was a popular choice, and in most cases Zoom lets someone join a meeting as long as they have the correct meeting ID. The report notes Zoom in most cases allows joining with the correct meeting ID, and that meeting details were reachable through public calendars.
- Exposed documents on project and meeting plans: some employees had publicly accessible Google Docs and presentations that would normally be hard for an external attacker to find. Because they were hyperlinked in meetings and calendar objectives, the author could reach them and read internal information such as meeting agendas and new product features.
- Internal livestreams: many companies run weekly or quarterly meetings and other internal livestreams. Most were password protected, but the passwords were also embedded in the calendar invites sent to employees.
Setup
The only precondition is a list of email addresses belonging to the target organisation. The author gathered uber.com addresses with hunter.io, which can be used either through its API or through its UI. The UI shows roughly 793 Uber emails queried by Hunter.io. Not all of them belong to current staff: some may be former employees or shared addresses. The author then used the Hunter.io API to pull the full list and passed it into a scraper.
No accounts, roles or special access on the target side were needed. The calendars being tested were public, so the embed URL could be loaded by anyone.
Finding it
The author wanted to know whether public calendars could be identified automatically. Looking at how Google Calendar works, he found that a calendar can be embedded or shared with a link of this shape:
https://calendar.google.com/calendar/htmlembed?src=[redacted]&ctz=American/Los_Angeles
The src parameter carries the calendar owner's email address and ctz sets the timezone used for display. The important observation was the response behaviour of the embed endpoint: a calendar that is private or does not exist returns a 500 internal error, while a public calendar returns a 200 status code. That difference lets you tell whether a given address has a public calendar.
Exploitation
Step 1: collect employee email addresses
The author queried hunter.io for uber.com addresses. The UI result below shows about 793 emails found for the domain.
He then used the Hunter.io API to retrieve the same set of addresses in bulk and fed them into a scraper.
Step 2: test each address against the embed endpoint
With the addresses parsed, he wrote a script that reads a txt file and iterates through the emails, requesting the embed URL for each one and checking the status code. A 200 means the calendar is public; a 500 means it is private or does not exist.
https://calendar.google.com/calendar/htmlembed?src=[redacted]&ctz=American/Los_Angeles
Substituting each collected address for [redacted] is the whole test. The script only needs to distinguish the two status codes.
Step 3: confirm a public calendar
Soon after running the script, the author found at least one email whose calendar was public. The screenshot below shows the result.
From that point the calendar contents were readable, including the links placed in events. That is how the meeting IDs, linked documents and livestream passwords described above became reachable.
Root cause
Google Calendar's sharing model is working as designed: a calendar marked public is served to anyone who requests its embed URL, and the endpoint distinguishes public calendars (200) from private or non-existent ones (500). The weakness is on the customer side: employees set work calendars to public. Because the embed URL is keyed on the email address, an attacker who can enumerate company addresses can check every one of them cheaply.
The 500-versus-200 difference is what the author's script checked for each address.
Impact
An external attacker with a list of company email addresses can identify which employees have public calendars and read their contents. In the cases found, this exposed internal meeting details including Zoom meeting IDs, links to publicly accessible Google Docs and presentations containing meeting agendas and new product features, and passwords for internal livestreams that were embedded in calendar invites. The author notes that Zoom in most cases allows joining a meeting with only the correct meeting ID, so a leaked ID can be enough to attend.
The author targeted 10 companies. Four of them had employees vulnerable to this issue:
- Uber
- Shopify
- ███████████ (permission not yet given)
- Netflix
Fix
The author lists several ways for a company to resolve the issue:
- If you use GSuite, as a GSuite admin you can set rules and monitor when Google Calendars are set to public.
- If employees really want public calendars, set the calendar to publicly show only Free/Busy, following Google's guidance at https://support.google.com/a/answer/60765?hl=en.
- Provide security awareness training to employees.
- Monitor calendars weekly or daily. To do so, export the list of all emails used in the organisation and scan it to see whether any of them have public calendars.
Variants to test
- Other domains in the same organisation: run the same embed check against every address you can collect, including subsidiaries and acquired domains. A 200 on any address is a positive result.
- Other calendar products with embeddable public views: look for an equivalent public share or embed endpoint and compare the response for a known public calendar against a private or non-existent one. A stable difference in status code or body is the oracle you need.
- Links inside public events: for any calendar found public, follow the URLs in event descriptions and attachments. A document or recording that opens without authentication is a positive result.
- Meeting identifiers and passwords in event text: check whether events carry video meeting IDs or livestream passwords. Being able to join or watch with only those values confirms the exposure.
- Free/Busy-only calendars: check whether a calendar that shows only Free/Busy still leaks event titles or descriptions through the embed view. Any detail beyond busy blocks is a positive result.
What happened, in plain words
Google Calendar is a free online calendar from Google. Like a paper diary, it holds your appointments, but it lives on the internet. You can share a calendar with other people, or embed it on a web page so that visitors can see your schedule. When you do that, Google gives you a special web address (a URL) that anyone can open in a browser. That address contains your email address, so if someone knows or guesses your email, they can try to open your calendar.
This is a story about what happens when employees of big companies leave their work calendars set to public. A public calendar is one that anyone on the internet can read, without logging in. The author of the research, Rojan Rijal (also known as @uraniumhacker), started thinking about this during a workshop on reconnaissance (finding information about a target) at the Offensive Security Society at CSUF. He noticed that many companies had the same problem. Together with Brandon Nguyen (@cmdrsnuggle), he wrote up what he found.
When a work calendar is public, it can leak all sorts of internal information. The write-up lists three kinds:
- Internal meetings: many companies hold remote meetings using video calls. Zoom was a popular tool. In most cases, Zoom lets someone join a meeting if they have the correct meeting ID. The report notes Zoom in most cases allows joining with the correct meeting ID, and that meeting details were reachable through public calendars.
- Exposed documents on project and meeting plans: some employees had Google Docs and presentations that were publicly accessible. Normally these would be hard for an outsider to find. But because they were linked in meetings and calendar entries, the author could click through and read internal information such as meeting agendas and details of new product features.
- Internal livestreams: many companies run weekly or quarterly all-hands meetings and other internal livestreams. Most were protected by a password, but the passwords were also written in the calendar invites sent to employees. So anyone reading the public calendar could find the password and watch the stream.
Setting up
The only thing you need to start is a list of email addresses that belong to the target company. The author gathered uber.com addresses using a service called hunter.io. Hunter.io is a website that helps you find email addresses associated with a domain (the part after the @ in an email, like uber.com). You can use it in two ways: through its API or through its user interface (UI).
An API (Application Programming Interface) is a way for one computer program to talk to another. Think of it as a waiter in a restaurant: you (the program) tell the waiter what you want from the kitchen (the service), and the waiter brings it back. The UI is the website you see and click on in your browser.
For this blog, the author shows the UI side. The screenshot below shows the Hunter.io interface with about 793 Uber emails found for the domain.
Not all of those 793 addresses belong to current employees. Some may be former employees or shared addresses that no longer exist. That is fine: the test will simply show no public calendar for those. After looking at the UI, the author used the Hunter.io API to download the full list of addresses in one go, and passed them into a scraper. A scraper is a small program that automatically visits web pages or calls APIs and pulls out the information it needs, instead of a person clicking around by hand.
No special access was needed on the target side. The calendars being tested were public, so anyone could load the embed address in a browser.
Finding it
The author wanted to know if he could automatically spot which calendars were public. He looked at how Google Calendar works. Google Calendar lets you embed or share a calendar, and the link to do so looks like this:
https://calendar.google.com/calendar/htmlembed?src=[redacted]&ctz=American/Los_Angeles
Let's break that address down:
https://calendar.google.com/calendar/htmlembedis the address of a special page on Google's servers that shows a calendar in a form you can put on another website (an embed).?starts the part of the address that carries extra settings, called parameters.src=[redacted]is a parameter namedsrc(short for source). It holds the email address of the calendar's owner. In a real test you would replace[redacted]with an address from your list.&separates one parameter from the next.ctz=American/Los_Angelesis a parameter namedctz(short for calendar timezone). It sets the timezone used to display the events. Here it is set to American/Los_Angeles.
The key observation was how the embed page responds. When you open a web address, the server sends back a status code, a three-digit number that tells the browser whether the request worked. A code starting with 2 (like 200) means success. A code starting with 5 (like 500) means the server had an internal error. The author found that if the calendar is private or does not exist, the embed page returns a 500 internal error. If the calendar is public, it returns a 200 status code. That difference lets you tell whether a given email address has a public calendar just by checking the status code.
Exploitation
Step 1: collect employee email addresses
The author queried hunter.io for uber.com addresses. The UI result below shows about 793 emails found for the domain.
He then used the Hunter.io API to retrieve the same set of addresses in bulk and fed them into a scraper.
Step 2: test each address against the embed endpoint
With the addresses parsed, he wrote a script that reads a text file and goes through the emails one by one, requesting the embed URL for each one and checking the status code. A 200 means the calendar is public; a 500 means it is private or does not exist.
https://calendar.google.com/calendar/htmlembed?src=[redacted]&ctz=American/Los_Angeles
This is the same address as before. The whole test is to replace [redacted] with each collected address and see which status code comes back. The script only needs to tell the two codes apart.
Step 3: confirm a public calendar
Soon after running the script, the author found at least one email whose calendar was public. The screenshot below shows the result.
From that point the calendar contents were readable, including the links placed in events. That is how the meeting IDs, linked documents and livestream passwords described earlier became reachable.
Why it works
Google Calendar's sharing model is working as designed: a calendar marked public is served to anyone who requests its embed URL, and the endpoint distinguishes public calendars (200) from private or non-existent ones (500). The weakness is on the customer side: employees set work calendars to public. Because the embed URL is keyed on the email address, an attacker who can list company addresses can check every one of them cheaply.
The 500-versus-200 difference is what the author's script checked for each address.
Impact
An external attacker with a list of company email addresses can identify which employees have public calendars and read their contents. In the cases found, this exposed internal meeting details including Zoom meeting IDs, links to publicly accessible Google Docs and presentations containing meeting agendas and new product features, and passwords for internal livestreams that were embedded in calendar invites. The author notes that Zoom in most cases allows joining a meeting with only the correct meeting ID, so a leaked ID can be enough to attend.
The author targeted 10 companies. Four of them had employees vulnerable to this issue:
- Uber
- Shopify
- ███████████ (permission not yet given)
- Netflix
How to fix it
The author lists several ways for a company to resolve the issue:
- If you use GSuite, as a GSuite admin you can set rules and monitor when Google Calendars are set to public.
- If employees really want public calendars, set the calendar to publicly show only Free/Busy, following Google's guidance at https://support.google.com/a/answer/60765?hl=en.
- Provide security awareness training to employees.
- Monitor calendars weekly or daily. To do so, export the list of all emails used in the organisation and scan it to see whether any of them have public calendars.
Other things to test
- Other domains in the same organisation: run the same embed check against every address you can collect, including subsidiaries and acquired domains. A 200 on any address is a positive result.
- Other calendar products with embeddable public views: look for an equivalent public share or embed endpoint and compare the response for a known public calendar against a private or non-existent one. A stable difference in status code or body is the signal you need.
- Links inside public events: for any calendar found public, follow the URLs in event descriptions and attachments. A document or recording that opens without authentication is a positive result.
- Meeting identifiers and passwords in event text: check whether events carry video meeting IDs or livestream passwords. Being able to join or watch with only those values confirms the exposure.
- Free/Busy-only calendars: check whether a calendar that shows only Free/Busy still leaks event titles or descriptions through the embed view. Any detail beyond busy blocks is a positive result.
Glossary
- API: a way for one computer program to talk to another, like a waiter taking your order to the kitchen.
- Calendar embed: a special web address that shows a calendar inside another web page.
- ctz: a parameter in the embed URL that sets the timezone for displaying events.
- Domain: the part of an email address after the @, such as uber.com.
- Free/Busy: a calendar setting that shows only whether someone is busy or free, without event details.
- GSuite: Google's set of business tools that includes Google Calendar.
- Hunter.io: a website and API for finding email addresses associated with a domain.
- Parameter: an extra setting added to a URL after a question mark, like
srcorctz. - Public calendar: a calendar that anyone on the internet can view without logging in.
- Reconnaissance: the information-gathering phase of a security test.
- Scraper: a program that automatically collects data from websites or APIs.
- src: a parameter in the embed URL that holds the calendar owner's email address.
- Status code: a three-digit number a web server sends back to say whether a request worked (200 means success, 500 means server error).
- UI: user interface, the part of a website you see and click on.
- URL: the address of a web page.
- Zoom: a video conferencing tool; meetings can often be joined with just the meeting ID.