The Butterfly Effect: Turning Overlooked - Misconfigurations into Zero Click Account Takeover
A GraphQL API had an IDOR that let a student session enumerate all students and administrators, and a login mutation that accepted a null password when an SSO flag was set, returning a valid JWT. By chaining these, an attacker could obtain tokens for any student or admin account, leading to full account takeover.
Published on oussamarahali.com
In the world of application security, even low severity misconfigurations can act as a butterfly’s wing flap, triggering a chain reaction that leads to more impactful attack scenarios. Today, I’ll take you on a journey through one such scenario, where low impact vulnerabilities snowball into a full blown zero click…
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 backend login logic did not enforce the non-null password constraint when the loggedSSO flag was true, and the GraphQL API lacked proper authorization checks on user lookup queries.
Impact
An attacker could take over any student or administrator account without any interaction from the victim, gaining full control including admin privileges.
What the attacker needed
A student account; knowledge of a target email address
How it was found
- Discover GraphQL suggestions feature enabled, revealing available queries and mutations.
- Use a student session to query student and administrator objects by ID, enumerating all users and admins.
- Analyse JavaScript files to find the loginStudent mutation with a loggedSSO parameter.
- Send a loginStudent mutation with a known email, empty password, and loggedSSO set to true, receiving a valid JWT.
- Use GraphQL suggestions to discover the loginAdmin mutation.
- Send a loginAdmin mutation with an admin email, empty password, and loggedSSO true, receiving an admin JWT with adminLevel.
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.
The website's login system had a flaw: it would give out a valid session token even if you didn't provide a password, as long as you set a special flag. Separately, a feature meant to show user profiles let anyone look up other users' details, including email addresses. By combining these, an attacker could log in as any user, including administrators, without knowing their passwords.
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.