Exploiting weak configurations in Google Cloud Identity Platform
A web application leaked Firebase API keys and authentication tokens in server responses, allowing an authenticated user to make unauthorised REST API calls to the Identity Platform backend. An attacker could change the victim's email address, password, or delete their account.
blog.appsecco.com
Published on blog.appsecco.com
This post is the second in a series of technical posts we are writing about Exploiting weak configuration in Cloud based Authentication and Authorisation services.
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 exposed sensitive authentication tokens and API keys in HTTP responses, and the backend did not enforce that only the web application could perform certain operations.
Impact
An attacker with a valid account could change the victim's email address, password, or delete their account, potentially leading to account takeover.
What the attacker needed
A valid user account; access to the application's HTTP traffic
How it was found
- Log in to the application using a federated identity provider and intercept traffic with a proxy.
- Identify the POST request to the verifyAssertion endpoint and note the API key in the URL.
- From the response, copy the idToken and the API key.
- Use the API key and idToken in a cURL request to the accounts:update endpoint to change the user's email address.
- Observe that the email address is changed in the application.
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 in to a website, the server often sends back special codes (tokens) that prove who you are. If the website also sends the secret key used to talk to its login service, a user can take those codes and talk directly to the service, bypassing the website's restrictions. This lets them do things like change their email or delete their account, which the website normally wouldn't allow.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.