[www.zomato.com] IDOR - Gold Subscription Details, Able to view "Membership ID" and "Validity Details" of other Users
The subscription_id parameter in a Zomato Gold payment success URL was vulnerable to IDOR, allowing anyone to view another user's membership ID, start and end dates, and plan duration by changing the parameter value. An attacker could enumerate subscription details of other users.
- Triaged in 2 hours
- Fixed in 5 hours
- Paid in 5 hours
- Disclosed after 6 hours
Summary by the program
@riya found an IDOR which leaked Validity of Gold Subscriptions. Thanks for helping us in making @zomato more secure :)
Disclosing it to encourage more female bug hunters to get into Bug Bounties/Security.
Cheers.
The report
Hello Zomato,
The following URL : https://www.zomato.com/gold/payment-success?subscription_id=██████████&user_id=█████████ is vulnerable to IDOR in subscription_id field. Anyone can get Subscription Start & End Date and Plan Duration of a Membership ID just by changing the subscription_id parameter.
MEMBERSHIP ID : ████ STARTED ON : 22 Dec 2017 VALID UP TO : 22 Jun 2018 Subscription Plan : 6 month plan
Impact
Anyone can get Subscription Start & End Date and Plan Duration of a Membership ID.
Cheers! Riya
What the report shows
The target is Zomato's Gold subscription feature, reached through a payment success page on www.zomato.com. The page takes two query parameters, subscription_id and user_id, and the researcher found the subscription_id field vulnerable to IDOR.
The vulnerable URL, as given in the report:
https://www.zomato.com/gold/payment-success?subscription_id=██████████&user_id=█████████
By changing the subscription_id parameter, anyone could retrieve the subscription start date, end date and plan duration belonging to a membership ID that was not theirs. The report demonstrates the leak with one example record:
MEMBERSHIP ID : ████
STARTED ON : 22 Dec 2017
VALID UP TO : 22 Jun 2018
Subscription Plan : 6 month plan
The impact section restates the same point: anyone can get the subscription start and end date and the plan duration of a membership ID. The report does not describe any further exploitation, such as chaining the leak to account access or payment changes.
The program's summary confirms the finding as an IDOR that leaked the validity of Gold subscriptions. The report was disclosed on 28 April 2018, rated low severity, and paid a bounty of 100.00 USD. The program framed the disclosure as encouragement for more women to take part in bug bounty work. The report does not describe the fix that was applied.
Root cause
Impact
The exposure here is limited to subscription metadata: the membership ID, the start date, the end date and the plan duration. The leak exposes the membership ID, start date, end date and plan duration of a membership. The report does not claim access to payment data, personal details or account takeover, and the low severity rating is consistent with a metadata leak of this kind.
How this kind of bug works
An insecure direct object reference occurs when an application exposes an internal identifier in a request and uses it to fetch a record without an authorisation check tied to the caller. The identifier can be a sequential integer, a UUID, a hashed value or a composite key; what matters is that the server treats possession of the identifier as sufficient proof of entitlement.
Two conditions usually combine. First, the object is addressed directly by a client-controlled value rather than resolved from the session. Second, the access control decision is made at the wrong layer: the route may require a logged-in session, so the request is authenticated, but nothing checks that the authenticated principal owns the object being requested. This is why IDOR is often described as an authorisation flaw rather than an authentication flaw.
Defences work by removing the client's choice or by checking ownership. Records can be resolved from the session rather than from a parameter, identifiers can be replaced with unguessable values, and every object access can be passed through an ownership check that compares the record's owner against the current principal. Unpredictable identifiers alone are not a fix, since identifiers leak through URLs, referrers, logs and shared links; they only raise the cost of enumeration.
How to test for it
- Map the features that display or act on a single object: order confirmations, invoices, subscriptions, bookings, messages, documents, profile settings. Look for requests that carry an identifier in the path, query string or body.
- Create two accounts of the same role and populate each with at least one object of the kind under test. Note the identifiers each account receives.
- With account A's session, request A's object and confirm the normal response. Then replay the same request substituting B's identifier, keeping A's cookies and headers unchanged.
- Compare status code, body length and content. A positive result is a full or partial rendering of B's object: B's dates, amounts, names or identifiers appearing in a response to A's session.
- Repeat with the identifier removed, set to an empty value, set to a non-existent value and set to a value belonging to a deleted object, to see how the handler behaves at the edges.
- Test write paths as well as read paths: changing an address, cancelling a subscription or updating a profile using another user's identifier is a stronger finding than a read.
Common false positives include responses that return a generic error page with a 200 status, pages that echo the submitted identifier back without any associated data, and cases where the second account's object is genuinely public. Check that the leaked fields really belong to the other account and are not defaults or cached values from your own session.
How it is fixed
Resolve the object from the authenticated session wherever possible, so the client never supplies the key. Where a client-supplied identifier is unavoidable, perform a server-side ownership check on every request before returning data or applying a change, and apply it uniformly across read and write handlers. Return a generic not-found or forbidden response rather than distinguishing between objects that do not exist and objects owned by someone else. Add regression tests that exercise cross-account access for each object endpoint, and review new endpoints for the same pattern during code review.
Hunting notes
These bugs cluster around features added quickly: payment success and receipt pages, subscription management, export and download links, notification preferences, and any endpoint that takes an identifier plus a second parameter that hints at a user. Sequential numeric identifiers in query strings are the classic signal, but UUIDs in paths deserve the same treatment.
Recon signals worth following are endpoints whose names suggest a lookup by identifier (?id=, ?subscription_id=, /invoice/1234), parameters that appear alongside a user identifier, and responses that include internal identifiers you did not supply. Comparing the parameter set across similar features often reveals one endpoint that forgot the check the others have.
To make the report land, show the two-account setup, the exact request with the substituted identifier, and the response containing the other account's data, with the sensitive values redacted. State clearly what the leaked fields are and what an attacker gains from them, and avoid overstating the impact beyond what the response actually contains.
What happened, in plain words
Zomato's Gold programme is a paid membership, and the site shows a confirmation page after payment. After paying, the site shows you a confirmation page that summarises your membership.
That confirmation page lives at a web address on www.zomato.com and carries two pieces of information in the address itself: a subscription_id (an identifier for the membership record) and a user_id (an identifier for the account). The researcher found the subscription_id field vulnerable to IDOR, so changing it showed another membership's details.
A web address like this is called a URL, and everything after the ? is the query string: a list of name and value pairs the browser sends to the server. When you change a value in the query string and reload, you are asking the server a slightly different question. Normally the server should also ask "and are you allowed to see the answer?" Here it did not.
The vulnerable URL, exactly as given in the report:
https://www.zomato.com/gold/payment-success?subscription_id=██████████&user_id=█████████
Line by line:
https://www.zomato.comis the site, over an encrypted connection (HTTPS)./gold/payment-successis the page shown after a Gold payment succeeds.?starts the query string.subscription_id=██████████is the membership identifier. The blocks are where the real value was removed before publication.&separates the next pair.user_id=█████████is the account identifier.
By changing only the subscription_id value, anyone could retrieve the start date, end date and plan duration of a membership that was not theirs. The report shows one example record:
MEMBERSHIP ID : ████
STARTED ON : 22 Dec 2017
VALID UP TO : 22 Jun 2018
Subscription Plan : 6 month plan
So the page returned a membership number, the day the membership began, the day it expires, and which plan was bought. The impact section says the same thing in one sentence: anyone can get the subscription start and end date and the plan duration of a membership ID.
The report does not describe any further use of the leak, such as reaching an account or changing a payment. The program's summary confirms it as an IDOR that leaked the validity of Gold subscriptions. The report was disclosed on 28 April 2018, rated low severity, and paid a bounty of 100.00 USD. The program presented the disclosure as encouragement for more women to take part in bug bounty work. The fix that was applied is not described.
In general, how this kind of bug works
An insecure direct object reference, or IDOR, happens when a website lets the visitor name the record they want and then hands it over without checking that the record is theirs. The everyday comparison is a cloakroom: you hand in a ticket and get a coat. If the attendant gives you any coat whose number you read out, rather than only the coat matching your ticket, the system is broken even though every coat is stored correctly.
The identifier can be a plain number, a long random string, or a combination of values. What matters is that the server treats knowing the identifier as proof that you are entitled to the record.
Two conditions usually combine:
- The record is chosen by a value the client controls, rather than being worked out from the logged-in session.
- The access check is missing or in the wrong place. The page may require you to be logged in, so the request is authenticated, but nothing confirms that the logged-in person owns the record being requested. That is why IDOR is usually called an authorisation flaw rather than an authentication flaw.
Here, the user_id parameter sits next to subscription_id in the same URL, which suggests the page already carries a notion of the owning account. The report does not say whether that parameter was checked or simply ignored.
What the leak is worth
The exposure is limited to membership metadata: the membership ID, the start date, the end date and the plan duration. The leak exposes the membership ID, start date, end date and plan duration of a membership. The report does not claim access to payment data, personal details or account takeover, and the low severity rating fits a metadata leak of this kind.
How to test for it
- List the features that show or act on a single record: order confirmations, invoices, subscriptions, bookings, messages, documents, profile settings. Look for requests that carry an identifier in the path, the query string or the body.
- Create two accounts with the same role and give each at least one record of the kind you are testing. Note the identifier each account receives.
- While logged in as account A, request A's record and confirm the normal response. Then send the same request again with B's identifier, keeping A's cookies and headers unchanged. A cookie is the small piece of data your browser stores and sends back so the site knows which session is yours.
- Compare the status code, the length of the response and its content. A positive result is a full or partial rendering of B's record: B's dates, amounts, names or identifiers appearing in a response to A's session.
- Repeat with the identifier removed, set to empty, set to a value that does not exist, and set to a value belonging to a deleted record, to see how the page behaves at the edges.
- Test actions that change data as well as those that read it. Changing an address, cancelling a subscription or updating a profile using another user's identifier is a stronger finding than a read.
Common false positives include pages that return a generic error with a 200 status, pages that echo the identifier back without any associated data, and cases where the other account's record is genuinely public. Check that the leaked fields really belong to the other account and are not defaults or values cached from your own session.
How it is fixed
Work the record out from the logged-in session wherever possible, so the client never supplies the key. Where a client-supplied identifier cannot be avoided, check ownership on the server on every request before returning data or applying a change, and apply the same check to reads and writes. Return a generic not-found or forbidden response rather than distinguishing between records that do not exist and records owned by someone else. Add regression tests that exercise cross-account access for each endpoint, and review new endpoints for the same pattern.
Hunting notes
These bugs cluster around features added quickly: payment success and receipt pages, subscription management, export and download links, notification preferences, and any endpoint that takes an identifier plus a second parameter hinting at a user. Sequential numbers in query strings are the classic signal, but long random identifiers in paths deserve the same treatment.
Signals worth following are endpoint names that suggest a lookup by identifier (?id=, ?subscription_id=, /invoice/1234), parameters that appear next to a user identifier, and responses that include internal identifiers you did not supply. Comparing the parameters across similar features often reveals the one endpoint that forgot the check the others have.
To make the report land, show the two-account setup, the exact request with the substituted identifier, and the response containing the other account's data, with sensitive values redacted. State clearly which fields leaked and what an attacker gains from them, and do not overstate the impact beyond what the response actually contains.
Glossary
- Authentication: proving who you are, usually by logging in.
- Authorisation: deciding what a logged-in person is allowed to see or do.
- Bounty: a payment made by a company to a researcher who reports a valid security bug.
- Cookie: a small piece of data stored by your browser and sent with requests so the site can recognise your session.
- CVSS: a standard scoring system for the severity of a vulnerability.
- Endpoint: a specific address on a server that handles a particular request.
- HTTPS: the encrypted version of the protocol browsers use to talk to websites.
- IDOR (insecure direct object reference): a flaw where a site lets you name a record and returns it without checking that it belongs to you.
- Impact: the practical harm a bug can cause.
- Metadata: descriptive data about something, such as dates and identifiers, rather than its content.
- Parameter: a named value in a request, such as
subscription_idin a query string. - Query string: the part of a URL after
?, made of name and value pairs separated by&. - Redacted: removed or masked before publication, often shown as blocks.
- Root cause: the underlying reason a bug exists in the code.
- Severity: how serious a bug is judged to be.
- Status code: the number a server returns to describe the outcome of a request, such as 200 for success.
- URL: the address of a page or resource on the web.
- UUID: a long, practically unique identifier, often random.
- Vulnerability: a weakness in software that can be misused.