Exposing an OAuth Token Weakness in Amazon’s Mobile App: A Resp
A refresh token from Amazon's mobile app remained valid after 48 hours and could be replayed to obtain new access tokens, even when device metadata was altered. The resulting access token worked outside the app to retrieve the user's profile data, including name, email, and user ID.
Published on clawshea.medium.com
Cybersecurity isn’t just a profession — it’s a mindset. Sometimes, the most profound flaws are hidden in plain sight, waiting for a watchful eye to uncover them.
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 refresh token lacked expiry, rotation, and binding to the device or session, and the server did not validate device metadata.
Impact
An attacker who obtained a refresh token could replay it to get new access tokens and retrieve the user's profile data (name, email, user ID) from outside the app, as the token was not bound to the device or session.
What the attacker needed
Access to the Amazon mobile app traffic; ability to intercept HTTPS (MitM certificate); a valid refresh token
The fix
The text does not state that the issue was fixed; it recommends implementing refresh token rotation, server-side validation of device metadata, shorter token lifetimes, and binding tokens to client sessions.
How it was found
- Capture HTTPS traffic from the Amazon app using Burp Suite with a MitM certificate.
- Identify a refresh token used in the /auth/token endpoint.
- Replay the same POST request after 48 hours using Burp Repeater.
- Observe that the server returns HTTP 200 and a new access token.
- Alter device metadata fields (MAC address, serial number, Android ID, app name) and resend; the server still returns a valid access token.
- Use the new access token with curl to request the user profile endpoint, which returns name, email, and user ID.
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.
A refresh token is like a long-lived key that apps use to get new short-term access keys without asking you to log in again. Here, that key never expired and wasn't tied to the specific device or app, so anyone who captured it could keep using it to read the user's personal information.
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.