Skip to content
OAuth / SSO Write-up Advanced

Compromising Google Accounts: Exploiting Undocumented OAuth2 Functionality

An undocumented Google OAuth2 endpoint called MultiLogin accepts a token and GAIA ID pair to regenerate authentication cookies, allowing persistent access to Google accounts even after a password reset. Malware families incorporated this technique to maintain unauthorised access to compromised accounts.

cloudsek.com

Published on cloudsek.com

In October 2023, PRISMA, a developer, uncovered a critical exploit that allows the generation of persistent Google cookies through token manipulation. This exploit enables continuous access to Google services, even after a user's password reset.

Pavan Karthick M, on cloudsek.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 an undocumented OAuth2 endpoint that accepts a token and GAIA ID pair to regenerate cookies without sufficient binding to the current session or password state.

Impact

Attackers could maintain persistent access to Google accounts and regenerate cookies even after a password reset, though the exploit may be limited by Google's fraud detection and IP-based restrictions.

What the attacker needed

Malware on victim's device; stolen token and GAIA ID; ability to reach Google endpoint

The fix

Users should sign out of all browser profiles and reset their password to invalidate old tokens; Google should address the undocumented endpoint's abuse.

How it was found

  1. Malware extracts the token and GAIA ID from Chrome's token_service table.
  2. The stolen token and GAIA ID pair is sent to the MultiLogin endpoint.
  3. The endpoint returns fresh authentication cookies for Google services.
  4. The attacker uses these cookies to access the victim's Google account, even after a password reset.

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.

When you log into a website, it gives your browser a small file called a cookie so you don't have to type your password every time. This report describes a hidden Google feature that can create new cookies from a special pair of values (a token and an account ID). If malware steals those values, it can keep making new cookies and stay logged in, even if you change your password.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.