Skip to content
CSRF Write-up Beginner

CSRF Validation Bypass: How I Tested Swiggy’s API Security

The Swiggy address API endpoint accepted requests with empty or missing CSRF tokens and still returned sensitive user address data. A malicious website could potentially perform unauthorised actions on behalf of a logged-in user, though the vendor classified the report as Informational.

medium.com

Published on medium.com

Linkedin Profile: https://in.linkedin.com/in/binuconcept

Binu B, on medium.com

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 server did not enforce CSRF token validation on the address API endpoint, accepting requests with null or empty token values.

Impact

A malicious website could potentially perform unauthorised actions on behalf of a logged-in user and access sensitive address data, though the vendor classified the report as Informational.

What the attacker needed

Victim logged in to Swiggy; victim visits a malicious website; attacker knows the API endpoint

The fix

The server should enforce CSRF token validation on the address API endpoint and reject requests with missing or empty tokens.

How it was found

  1. Identify the Swiggy address API endpoint while navigating the website.
  2. Notice that CSRF token validation was not being enforced.
  3. Send requests with null or empty CSRF values.
  4. Observe that the server still returned sensitive address 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.

CSRF is when a malicious website tricks your browser into sending a request to another site where you are logged in, using your existing session. Normally a secret token proves the request came from the real site, but here the server did not check that token. The researcher found the server still returned the user's saved addresses even when the token was blank.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.