Bug Bounty Insights: 10 Key Findings - BAC in GraphQL - Part 3
The GraphQL API failed to enforce field-level access control, allowing an attacker to change an organisation's subdomain alias and to retrieve private user details such as email, phone, city and country. An attacker could spoof subdomains and harvest personal data for social engineering.
medium.com
Published on medium.com
Welcome to the third part of my 5-part series exploring vulnerabilities in a web application. In our previous articles, we discussed Open Redirect and IDOR (Insecure Direct Object References) vulnerabilities.
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 missing backend authorisation checks on individual GraphQL fields and mutation inputs, so extra fields supplied by the client were accepted without verifying the user's permission.
Impact
An attacker could change an organisation's subdomain alias, risking domain spoofing and reputational damage, and could retrieve private user data such as email, phone and location, enabling privacy violations and social engineering.
What the attacker needed
An admin account for the organisation; a logged-in user account; ability to intercept and modify GraphQL requests
How it was found
- Log in as an admin and open the organisation settings page.
- Change the organisation name and capture the GraphQL UpdateOrganization request.
- Add an alias parameter to the input object and send the request.
- Visit a user profile and capture the GraphQL request sent when clicking Add to Network.
- Append sensitive fields such as email, phone, city and country to the user object and send the query.
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.
GraphQL is a way for a website to ask its server for exactly the data it needs. Here the server did not check whether the person asking was allowed to see or change certain pieces of data, so someone could add extra fields to a request and get private information or change a subdomain.
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.