Privilege Escalation in 5 minutes: When you’re just one URL awa
The application placed an unvalidated and unencrypted access token containing privilege values in the URL, allowing an attacker to modify those values and escalate from a normal admin to a super admin. This gave the attacker access to sensitive data and administrative functions.
Published on medium.com
In the world of cybersecurity, privilege escalation is the ultimate “level up.” Imagine this: you’re working on an engagement, and everything seems locked down tight. Then, you stumble upon a vulnerable endpoint or misconfiguration that catapults you from an underprivileged user to an all-powerful administrator.
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 trusted client-side privilege values in an unvalidated and unencrypted token passed in the URL, instead of enforcing authorisation on the server.
Impact
An attacker could escalate from a normal admin to super admin, gaining access to sensitive data and administrative functions.
What the attacker needed
Valid credentials for a normal admin account; ability to modify the URL
The fix
The application should enforce authorisation on the server and never pass sensitive authentication tokens or privilege values as URL parameters.
How it was found
- Log in to the application as a normal admin user and observe the access token in the URL.
- Log in as a super admin user and note the differences in the token values, such as name, username, and current privilege.
- Log in again as the normal admin user and replace the privilege values in the token with those from the super admin token.
- Reload or continue and observe that the application now grants super admin access.
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 app gives you a token that says who you are and what you can do. Here, that token was put in the web address and was not checked or scrambled, so someone could simply edit the token to claim higher permissions. This let a normal admin become a super admin.
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.