Misconfigured SSO Led to a Critical Issue
All users, regardless of role, received AWS SigV4 credentials with the same high-level permissions, allowing a basic user to call admin and super admin APIs. The issue went unnoticed because some APIs used session cookies and others were unauthenticated, so no one tested the SigV4-authenticated APIs.
medium.com
Published on medium.com
Hi everyone, in this article, I’ll walk through a recent penetration test I conducted against a web application. As usual, we’ll cover:
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 Amazon Cognito identity pool assigned the same IAM role to all authenticated users, so the temporary AWS credentials carried identical permissions regardless of the user's application role.
Impact
A basic user could call admin and super admin APIs, potentially performing privileged actions, though the text does not detail specific data or operations affected.
What the attacker needed
A valid user account; access to the corporate network; ability to read browser local storage
The fix
The issue was fixed within a week, likely by ensuring each user receives credentials with permissions matching their role.
How it was found
- Log in to the application and open the browser's Local Storage to find the AWS SigV4 credentials.
- Export the access key, secret key, and session token as environment variables in a terminal.
- Run a command to check the identity and see the role name associated with the credentials.
- Repeat with credentials from other user accounts and observe the same role name.
- Use a tool that signs requests with SigV4 to call admin and super admin APIs using the basic user's credentials.
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, the system gives your browser temporary cloud credentials (like a key) to access certain APIs. The mistake was that every user, even the lowest-privilege one, got a key with the same powerful permissions. So a basic user could do admin things by using that key directly.
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.