The POS app doesn't revoke the Xauth token
The POS Android app does not revoke the authentication token on the server when a user logs off, even though it removes the local copy. An attacker who obtains the token could use it to make authenticated requests and hijack the user's session.
- Triaged in 5 days
- Fixed in 24 days
- Paid in 9 days
- Disclosed after 45 days
It was identified that the POS android application doesn't revoke the authentication token when the user logs off from the session. More specifically despite the fact that the app removes the entry from the shared_prefs/default_user.xml, the token remains active on the server side and may be used to validate an HTTP request. In order to reproduce the issue, follow the steps bellow:
- Connect to the POS mobile android app
- Fetch the authentication token, from either the default_user file or from a captured HTTP request
- Disconnect from the application
- Use the same token to perform authenticated request in behalf of the account that was connected in the POS
Impact
An application should always revoke an authentication token by the time that the end user choses to Log Off from a session. Keeping a token active, while the user is not aware of it imposes a big risk, since by the time that an unauthorised entity fetches it, may hijack the user's session and get full control of the store.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server does not invalidate the session token when the client logs out, only the client deletes its local copy.
Impact
An unauthorised entity who obtains the token could hijack the user's session and get full control of the store.
What the attacker needed
Access to the POS Android app; ability to capture or read the token
The fix
The server should revoke the authentication token when the user logs off.
How it was found
- Connect to the POS mobile Android app.
- Fetch the authentication token from the default_user file or a captured HTTP request.
- Disconnect from the application.
- Use the same token to perform an authenticated request on behalf of the connected account.
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 report has not been written yet. The Original tab links to the source.
When you log out of an app, you expect it to stop working. Here, the app deletes the saved login token from the phone, but the server still accepts that token. If someone had copied the token earlier, they could keep using it to act as the user even after logout.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.