Google has recently addressed a security vulnerability that could have allowed attackers to gain unauthorized access to users' Google Cloud Platform (GCP) accounts. The flaw, named GhostToken by Israeli cybersecurity firm Astrix Security, could have been exploited by attackers through malicious OAuth applications installed from the Google Marketplace or third-party providers. After being authorized and linked to an OAuth token, these apps could be made invisible by attackers, thereby hiding them from Google's application management page.
“Since this is the only place Google users can see their applications and revoke their access, the exploit makes the malicious app unremovable from the Google account. The attacker, on the other hand, as they please, can unhide their application and use the token to access the victim's account, and then quickly hide the application again to restore its unremovable state. In other words, the attacker holds a 'ghost' token to the victim's account,”
- outlines Astrix Security.
Attackers could make the malicious apps enter a 'pending deletion' state by deleting the linked GCP project, which would provide them with a refresh token upon restoration. This allowed them to retrieve a new access token, giving them access to the victims' data.
This process could be repeated multiple times, allowing attackers to continuously access the victim's data. This vulnerability "allows attackers to gain permanent and unremovable access to a victim's Google account by converting an already authorized third-party application into a malicious trojan app, leaving the victim's personal data exposed forever," comments Astrix Security Research Group.
Google has released a global patch that allows GCP OAuth applications in 'pending deletion' states to appear on the 'Apps with access to your account' page, allowing users to remove them and protect their accounts from hijack attempts. Astrix advises all Google users to visit their account's app management page and check all authorized third-party apps, ensuring that each of them has only the permissions they require to function.