Tickets Data Exfiltration/Modification Via CSRF After Bypassing Restrictions on a GraphQL API Endpoint
The GraphQL endpoint accepted mutations via GET requests, bypassing SameSite Lax cookie protection, and lacked CSRF tokens. An attacker could craft a link that, when clicked by a victim, added the attacker's email as a ticket participant, exfiltrating ticket data and allowing modification of tickets.
Published on 0xm0r4d.medium.com
In a well-known website that provide IT support functionalities, like zendesk. It was using a GraphQL API endpoint in some features like ticketing to do operations or retrieve queries.
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 GraphQL endpoint allowed mutations over GET and did not require a CSRF token, so SameSite Lax cookies were sent on cross-site GET requests.
Impact
An attacker could exfiltrate all tickets' data and modify ticket data on behalf of the victim, with only one click required, and the attacker keeps receiving future updates until removed.
What the attacker needed
Victim clicks a link; attacker knows victim's ticket ID or brute-forces it; no CSRF token required
How it was found
- Check the SameSite cookie attribute and find it is Lax.
- Convert a GraphQL query to GET format and confirm the server accepts it.
- Identify mandatory parameters in the updateTicket mutation and find ways to bypass unknown values (hex format check, brute-forcing version, omitting optional fields).
- Convert the updateTicket mutation to a GET request with URL-encoded parameters.
- Create a CSRF proof-of-concept that sends the GET request and deliver it to the victim.
- When the victim clicks, the ticket is updated with the attacker's email, exfiltrating data.
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.
A website used a special API (GraphQL) to manage support tickets. The API accepted requests via a simple link (GET), and the site's cookie protection (SameSite Lax) only blocks cross-site POST requests, not GET. So an attacker could make a victim's browser send a ticket update that added the attacker's email, leaking ticket contents. This is called CSRF (Cross-Site Request Forgery): tricking a logged-in user's browser into sending a request they didn't intend.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.