{"id":23868,"date":"2025-02-28T08:54:49","date_gmt":"2025-02-28T13:54:49","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/google-oauth-abandoned-domains-attack\/23868\/"},"modified":"2025-02-28T18:22:22","modified_gmt":"2025-02-28T14:22:22","slug":"google-oauth-abandoned-domains-attack","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/google-oauth-abandoned-domains-attack\/23868\/","title":{"rendered":"Attack on Google OAuth using abandoned domains"},"content":{"rendered":"<p>Just over a year ago, in our post entitled <a href=\"https:\/\/www.kaspersky.com\/blog\/vulnerability-in-google-oauth\/50286\/\" target=\"_blank\" rel=\"noopener nofollow\">Google OAuth and phantom accounts<\/a>, we discussed how using the \u201cSign in with Google\u201d option for corporate services allows employees to create phantom Google accounts that aren\u2019t controlled by the corporate Google Workspace admin, and continue to function after offboarding. Recently, it was <a href=\"https:\/\/trufflesecurity.com\/blog\/millions-at-risk-due-to-google-s-oauth-flaw\" target=\"_blank\" rel=\"nofollow noopener\">discovered<\/a> that this isn\u2019t the only issue with OAuth. Due to weaknesses in this authentication mechanism, anyone can gain access to data of many defunct organizations by re-registering domains they abandoned. In this article, we explore this attack in more detail.<\/p>\n<h2>How authentication works with \u201cSign in with Google\u201d<\/h2>\n<p>\nSome organizations may believe that \u201cSign in with Google\u201d provides a reliable authentication mechanism backed by Google\u2019s advanced technology and vast user monitoring capabilities. However, in reality, the Google OAuth authentication check is quite basic. It generally comes down to verifying that a user has access to an email address linked to an organization\u2019s Google Workspace.<\/p>\n<p>Moreover, as mentioned in our previous article on Google OAuth, this doesn\u2019t necessarily have to be a Gmail address\u00a0\u2014 Google accounts can be linked to any email address. Therefore, the security of accessing a corporate service via \u201cSign in with Google\u201d is only as strong as the security of the email linked to the Google account.<\/p>\n<p>Now let\u2019s get into the details\u2026<\/p>\n<p>When authenticating a user in a corporate service, Google OAuth sends the following information to that service:<\/p>\n<div id=\"attachment_53105\" style=\"width: 2042px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2025\/02\/28175647\/google-oauth-abandoned-domains-attack-1-EN.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-53105\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2025\/02\/28175647\/google-oauth-abandoned-domains-attack-1-EN.png\" alt=\"Description of Google OAuth ID token payload\" width=\"2032\" height=\"980\" class=\"size-full wp-image-53105\"><\/a><p id=\"caption-attachment-53105\" class=\"wp-caption-text\">In theory, the Google OAuth ID token includes a unique parameter called sub for each Google account. However, in practice, due to issues with its usage, services often only check the domain and email address. <a href=\"https:\/\/developers.google.com\/identity\/openid-connect\/openid-connect\" rel=\"nofollow noopener\" target=\"_blank\">Source<\/a><\/p><\/div>\n<p>Google recommends that services use the <em>sub<\/em> parameter, claiming that this identifier is unique and constant for the user account \u2014 unlike an email address. But in reality, the <em>sub<\/em> parameter isn\u2019t always constant; for a small number of users, it changes over time, which can cause authentication failures. As a result, services tend not to use it, and instead verify only the domain and email address \u2014 contrary to Google\u2019s recommendations.<\/p>\n<h2>\u201cSign in with Google\u201d using an abandoned domain<\/h2>\n<p>\nThus, an attacker can gain unauthorized access to a company\u2019s services by simply having access to an email within that company\u2019s domain. This is particularly easy to do if the company has ceased operations and abandoned its domain: anyone can register it for themselves.<\/p>\n<p>The attacker can then create any email address under this domain, and use it to log into one of the services the company likely used. Some of these services may display a list of real users linked to the organization\u2019s workspace\u00a0\u2014 even if the address entered by the attacker was never actually used.<\/p>\n<p>With this list \u2014 and complete control over all email addresses within the abandoned domain \u2014 the attacker can reconstruct the original Google Workspace of the defunct company. In this way, attackers can gain access to the profiles of former employees in services that used Google OAuth for authentication.<\/p>\n<h2>How serious a problem is this?<\/h2>\n<p>\nDylan Ayrey, the researcher who discovered this Google OAuth vulnerability (and the previous issue with <a href=\"https:\/\/www.kaspersky.com\/blog\/vulnerability-in-google-oauth\/50286\/\" target=\"_blank\" rel=\"noopener nofollow\">phantom accounts<\/a>), aimed to demonstrate the severity of potential consequences. Using data from Crunchbase, Ayrey compiled a list of over 100,000 terminated startups whose domains are now up for sale.<\/p>\n<p>Ayrey purchased one of these abandoned domains and tested the feasibility of the attack. Among the corporate services he managed to access using this vulnerability were Slack, Zoom, Notion, ChatGPT, and HR systems.<\/p>\n<p>Thus, with this relatively simple attack requiring minimal resources, an attacker can gain access to a wealth of confidential information, ranging from employee correspondence and notes to personal data from HR systems.<\/p>\n<p>According to Ayrey\u2019s estimates, around 50% of startups use Google Workspace. If we suppose that the average defunct startup had about 10 employees, we could be talking about hundreds of thousands of people and millions of vulnerable accounts.<\/p>\n<h2>Who\u2019s responsible, and what can be done?<\/h2>\n<p>\nAyrey dutifully notified Google of this vulnerability through its bug bounty program. He also suggested a long-term solution: creating truly permanent and unique identifiers for Google accounts and Google Workspace. However, his report was initially rejected, with the comment \u201cno fix needed\u201d and labeled as \u201cfraud or abuse\u201d!<\/p>\n<p>However, a few months after Ayrey presented his findings at a hacker conference (!) the report was reopened, and he was awarded $1337. Notably, he received the same minimal reward for his previous discovery of the phantom Google accounts vulnerability.<\/p>\n<p>According to Ayrey, Google promised to fix the vulnerability in Google OAuth, but didn\u2019t specify when or how exactly they plan to do this. Therefore, the problem with the \u201cSign in with Google\u201d mechanism remains an unresolved issue, for which no one is willing to take responsibility. Potential victims of this attack include former employees of defunct companies who no longer have control over their accounts. Worse still, there\u2019s no one to hold accountable for the security of these accounts anymore.<\/p>\n<p>The wise move here would be for companies to take preventive measures in advance. However, very few startups seriously plan for their own demise \u2014 let alone what will happen afterward.<\/p>\n<p>Fortunately, defending against this Google OAuth vulnerability is relatively straightforward. There are two non-mutually exclusive options:\n<\/p>\n<ul>\n<li>Use a traditional login-and-password combo instead of \u201cSign in with Google\u201d, and always enable two-factor authentication.<\/li>\n<li>If your company ceases operations, don\u2019t abandon workspaces in corporate services; delete them instead. This is quite easy to do; for example, here are the instructions for <a href=\"https:\/\/slack.com\/intl\/en-gb\/help\/articles\/204067366-Delete-a-workspace\" target=\"_blank\" rel=\"nofollow noopener\">Slack<\/a> and <a href=\"https:\/\/www.notion.com\/help\/create-delete-and-switch-workspaces%23delete-a-workspace\" target=\"_blank\" rel=\"nofollow noopener\">Notion<\/a>.<\/li>\n<\/ul>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"kaspersky-next\">\n","protected":false},"excerpt":{"rendered":"<p>A vulnerability in Google OAuth allows attackers to access accounts of defunct organizations through abandoned domains.<\/p>\n","protected":false},"author":2726,"featured_media":23871,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1318,1916,1917],"tags":[1474,359,1913,1815,22,82,609,1022,2087,521],"class_list":{"0":"post-23868","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-accounts","11":"tag-authentication","12":"tag-domains","13":"tag-e-mail","14":"tag-google","15":"tag-hacking","16":"tag-oauth","17":"tag-risks","18":"tag-startups","19":"tag-threats"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/google-oauth-abandoned-domains-attack\/23868\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/google-oauth-abandoned-domains-attack\/28628\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/google-oauth-abandoned-domains-attack\/28746\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/google-oauth-abandoned-domains-attack\/39144\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/google-oauth-abandoned-domains-attack\/53104\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/google-oauth-abandoned-domains-attack\/28869\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/google-oauth-abandoned-domains-attack\/34697\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/google-oauth-abandoned-domains-attack\/34324\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/authentication\/","name":"Authentication"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2726"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=23868"}],"version-history":[{"count":3,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23868\/revisions"}],"predecessor-version":[{"id":23873,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/23868\/revisions\/23873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/23871"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=23868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=23868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=23868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}