Skip to content
IDOR Disclosed report Beginner

IDOR Payments Status

The payment status endpoint did not check that the requested payment belonged to the authenticated account, so an attacker could change the payment identifier and read another account's payment status.

codeslayer1337 Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 8 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 5 months

Summary:

Found in the payment status function, IDOR's weakness. Where when doing the experiment managed to see the payment status of another account The following is the POC of the experiments carried out.

Steps To Reproduce:

1.GET /payments/paym_test_xxxx/status HTTP/2 Host: api.omise.co Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100" Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 Sec-Ch-Ua-Platform: "macOS" Accept: / Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: https://api.omise.co/ Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9

2.changed the id of the payment on the part I replaced it with paym_test_xxxx

Impact

The application does not validate the requested payment status value, whether it belongs to the account or not, so that attackers can see the payment status of other people's accounts,

Best regards,

Codeslayer137

Attachments

Screen_Shot_2022-04-12_at_17.58.25.png
Screen_Shot_2022-04-12_at_17.58.25.png From the original on HackerOne

The original report as published on HackerOne, by codeslayer1337. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Omise exposes a payments API at api.omise.co. Among its endpoints is a payment status lookup, which returns the status of a payment identified by its payment ID. The report describes a payment ID in the form paym_test_xxxx, which suggests test-mode identifiers were used during the experiment.

The feature is meant to let an authenticated caller read the status of a payment that belongs to their own account. The researcher found that the endpoint returned the status of a payment belonging to a different account.

Setup

The report does not describe account creation, roles or tooling beyond the HTTP client used. The request captured in the report was sent from Google Chrome 100 on macOS, as shown by the User-Agent and Sec-Ch-Ua headers, and the Referer is https://api.omise.co/, so the call was made from a page on that origin. The only precondition visible in the report is a valid payment ID belonging to another account.

Finding it

The researcher was experimenting with the payment status function and noticed that the response exposed the payment status of another account. The endpoint takes the payment ID as a path segment, and nothing in the request ties that ID to the caller's own account. That is the classic shape of an insecure direct object reference: an object identifier supplied by the client, used to look up a record, with no ownership check on the result.

Exploitation

Step 1: request the status of a payment

The researcher issued a status request for a payment ID:

HTTP
GET /payments/paym_test_xxxx/status HTTP/2
Host: api.omise.co
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36
Sec-Ch-Ua-Platform: "macOS"
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://api.omise.co/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

The important part is the path: /payments/paym_test_xxxx/status. The payment ID is the only thing that selects the record, and it is fully under the caller's control. The remaining headers are ordinary browser headers for a same-origin fetch from api.omise.co; none of them carries an ownership assertion. The report does not include the response body.

Step 2: change the payment ID

The researcher then changed the ID of the payment, replacing it with paym_test_xxxx. With a different payment ID in the same path position, the endpoint returned the status of a payment belonging to another account. No other part of the request needed to change.

Screen_Shot_2022-04-12_at_17.58.25.png
Screen_Shot_2022-04-12_at_17.58.25.png From the original on HackerOne

The report includes a screenshot as an attachment.

Root cause

The application does not validate the requested payment status value, whether it belongs to the account or not. In other words, the handler resolves the payment from the ID in the path and returns its status without checking that the payment is owned by the authenticated caller. Because the identifier is the only input that selects the object, any caller who knows or guesses a valid payment ID can read that payment's status. The report does not describe any additional defence, such as a per-account scoping of the lookup, that would have prevented this.

Impact

The weakness lets an attacker see the payment status of other people's accounts. The severity assigned to the report was low, with a bounty of 100.00 USD.

Fix

The fix implied by the root cause is to scope the lookup to the authenticated account: resolve the payment by ID and verify that it belongs to the caller before returning its status, rather than returning the status for any valid ID.

Variants to test

  1. Swap the object ID in other path-based lookups on the same API (for example, other resources addressed as /<resource>/<id>/<subresource>) for an ID belonging to a second account. A positive result is a response containing the second account's data.
  2. Try IDs from a different environment or mode than the one you are authenticated in, such as test identifiers against a live session. A positive result is a status response for an object you do not own.
  3. Check whether the ownership check exists only on some subresources: request the parent object and each subresource with the same foreign ID. A positive result is any subresource that returns data while the parent is correctly denied.
  4. Compare responses for a valid foreign ID, an invalid ID and your own ID. A positive result is a clear difference between the foreign and invalid cases, which shows the object exists and is being resolved before any authorisation decision.

Hunting notes

This kind of bug tends to hide in endpoints that take an object identifier directly in the path and return a derived value, such as a status, rather than the full object. Those endpoints are easy to overlook because they look read-only and low value, and the ownership check is often applied to the main resource but not to the subresource. During recon, look for path patterns of the form /<resource>/<id>/<subresource> in API traffic and note which ones accept client-supplied IDs. The signal that matters is a response that varies with the ID rather than with the session.

To show enough impact, demonstrate the cross-account read with a concrete foreign ID: the request with the substituted ID and the resulting status of the other account. Keeping the demonstration to a single, clearly foreign object makes the ownership failure unambiguous.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

Omise runs a service that lets businesses take payments online. Part of that service is an API, which is a way for one computer program to talk to another over the internet. You can think of an API as a counter in a shop: you hand over a request in a fixed format, and the counter hands back an answer in a fixed format. The Omise API lives at api.omise.co.

One of the things that API can do is tell you the status of a payment. A payment is a single attempt to move money, and it has a status such as pending, successful or failed. Each payment has its own identifier, a short code that names that one payment, in the form paym_test_xxxx. The word test in that code suggests these were test-mode payments, the kind you use while building an integration rather than real money.

The idea is that a logged-in customer should be able to ask for the status of a payment that belongs to their own account, and nothing else. The researcher found that the API would also answer for a payment belonging to a different account. The only thing you had to change was the payment identifier in the request. This kind of mistake has a name: an insecure direct object reference, usually shortened to IDOR. "Object" here means a record in the system, such as one payment. "Direct reference" means the client names that record itself, by its identifier. "Insecure" means the server does not check that the person asking is allowed to see that particular record.

A simple comparison: imagine a hotel where every room key is just the room number written on a card. If reception never checks that the number on your card matches the room you actually booked, you can write any number on the card and open that door. The room number is the direct reference, and the missing check at the door is the vulnerability.

The report was rated low severity and paid a bounty of 100.00 USD.

Context

Omise exposes a payments API at api.omise.co. Among its endpoints is a payment status lookup. An endpoint is one specific address on the API that does one specific job, in the same way that a single counter in a large office handles one kind of form. This endpoint returns the status of a payment identified by its payment ID.

The report describes a payment ID in the form paym_test_xxxx, which suggests test-mode identifiers were used during the experiment.

The feature is meant to let an authenticated caller read the status of a payment that belongs to their own account. "Authenticated" means the request carries proof of who is asking, such as a session or an API key. The researcher found that the endpoint returned the status of a payment belonging to a different account.

Setup

The report does not describe account creation, roles or tooling beyond the HTTP client used. HTTP is the language browsers and servers use to exchange requests and responses, and an HTTP client is simply the program that sends the request.

The request captured in the report was sent from Google Chrome 100 on macOS, as shown by the User-Agent and Sec-Ch-Ua headers. Headers are extra lines of information attached to a request, a bit like the label on a parcel that says what is inside and where it came from. The Referer is https://api.omise.co/, so the call was made from a page on that origin. "Origin" means the combination of scheme, host and port, here https plus api.omise.co; browsers treat requests to the same origin differently from requests to other sites.

The only precondition visible in the report is a valid payment ID belonging to another account.

Finding it

The researcher was experimenting with the payment status function and noticed that the response exposed the payment status of another account. The endpoint takes the payment ID as a path segment. The path is the part of the address after the host name, the way /payments/... appears after api.omise.co. Nothing in the request ties that ID to the caller's own account.

That is the classic shape of an insecure direct object reference: an object identifier supplied by the client, used to look up a record, with no ownership check on the result. The client says "give me record number X", the server fetches record X, and nobody asks whether record X belongs to the client.

Exploitation

Step 1: request the status of a payment

The researcher issued a status request for a payment ID:

HTTP
GET /payments/paym_test_xxxx/status HTTP/2
Host: api.omise.co
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36
Sec-Ch-Ua-Platform: "macOS"
Accept: */*
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://api.omise.co/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

Line by line, in plain words:

  1. GET /payments/paym_test_xxxx/status HTTP/2 is the request itself. GET is the method, meaning "read something, do not change anything". The path /payments/paym_test_xxxx/status says which payment and which piece of information about it. HTTP/2 is the version of the protocol being used.
  2. Host: api.omise.co names the server the request is addressed to.
  3. Sec-Ch-Ua, Sec-Ch-Ua-Mobile and Sec-Ch-Ua-Platform are headers in which the browser describes itself: which browser and version, whether it is on a mobile device, and which operating system. They are sent automatically; the person making the request does not type them.
  4. User-Agent is the longer, older version of the same self-description, naming Chrome 100 on macOS.
  5. Accept: */* says the client will accept any response format.
  6. Sec-Fetch-Site: same-origin, Sec-Fetch-Mode: cors and Sec-Fetch-Dest: empty are headers the browser adds to describe the context of the request. same-origin means the request was made from a page on the same site, and cors refers to the rules for requests made across sites.
  7. Referer: https://api.omise.co/ says which page the request came from.
  8. Accept-Encoding: gzip, deflate says the client can accept a compressed response, which saves bandwidth.
  9. Accept-Language: en-US,en;q=0.9 says the client prefers English (United States).

The important part is the path: /payments/paym_test_xxxx/status. The payment ID is the only thing that selects the record, and it is fully under the caller's control. The remaining headers are ordinary browser headers for a same-origin fetch from api.omise.co; none of them carries an ownership assertion. The report does not include the response body.

Step 2: change the payment ID

The researcher then changed the ID of the payment, replacing it with paym_test_xxxx. With a different payment ID in the same path position, the endpoint returned the status of a payment belonging to another account. No other part of the request needed to change.

Screen_Shot_2022-04-12_at_17.58.25.png
Screen_Shot_2022-04-12_at_17.58.25.png From the original on HackerOne

The report includes a screenshot as an attachment.

Root cause

The application does not validate the requested payment status value, whether it belongs to the account or not. In other words, the handler resolves the payment from the ID in the path and returns its status without checking that the payment is owned by the authenticated caller. The handler is the piece of server code that runs when that endpoint is called. Because the identifier is the only input that selects the object, any caller who knows or guesses a valid payment ID can read that payment's status. The report does not describe any additional defence, such as a per-account scoping of the lookup, that would have prevented this.

Impact

The weakness lets an attacker see the payment status of other people's accounts. The severity assigned to the report was low, with a bounty of 100.00 USD.

Fix

The fix implied by the root cause is to scope the lookup to the authenticated account: resolve the payment by ID and verify that it belongs to the caller before returning its status, rather than returning the status for any valid ID. In the hotel comparison, this is the reception desk checking that the room number on your card is the room you booked.

Variants to test

  1. Swap the object ID in other path-based lookups on the same API (for example, other resources addressed as /<resource>/<id>/<subresource>) for an ID belonging to a second account. A positive result is a response containing the second account's data.
  2. Try IDs from a different environment or mode than the one you are authenticated in, such as test identifiers against a live session. A positive result is a status response for an object you do not own.
  3. Check whether the ownership check exists only on some subresources: request the parent object and each subresource with the same foreign ID. A positive result is any subresource that returns data while the parent is correctly denied.
  4. Compare responses for a valid foreign ID, an invalid ID and your own ID. A positive result is a clear difference between the foreign and invalid cases, which shows the object exists and is being resolved before any authorisation decision.

Hunting notes

This kind of bug tends to hide in endpoints that take an object identifier directly in the path and return a derived value, such as a status, rather than the full object. Those endpoints are easy to overlook because they look read-only and low value, and the ownership check is often applied to the main resource but not to the subresource. During recon, look for path patterns of the form /<resource>/<id>/<subresource> in API traffic and note which ones accept client-supplied IDs. The signal that matters is a response that varies with the ID rather than with the session.

To show enough impact, demonstrate the cross-account read with a concrete foreign ID: the request with the substituted ID and the resulting status of the other account. Keeping the demonstration to a single, clearly foreign object makes the ownership failure unambiguous.

Glossary

  • API: a fixed way for one program to ask another program for data or actions, like a service counter with set forms.
  • Endpoint: one specific address on an API that performs one specific job.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • HTTP client: the program that sends an HTTP request, such as a browser.
  • GET: an HTTP method meaning "read this, do not change it".
  • Header: an extra line of information attached to a request or response, such as the browser name or the referring page.
  • Path: the part of a URL after the host name, such as /payments/paym_test_xxxx/status.
  • Host: the server name a request is addressed to, here api.omise.co.
  • Origin: the combination of scheme, host and port that browsers use to decide whether two things are the same site.
  • Referer: a header saying which page a request came from.
  • User-Agent: a header in which the client describes its browser and operating system.
  • Payment ID: the short code that names one payment, here in the form paym_test_xxxx.
  • Test mode: an environment for building and trying things without moving real money.
  • Authenticated: a request that carries proof of who is asking, such as a session or an API key.
  • IDOR (insecure direct object reference): a flaw where the client names a record by its identifier and the server returns it without checking that the client is allowed to see it.
  • Ownership check: a server-side test that the record being requested belongs to the person asking.
  • Handler: the piece of server code that runs when a particular endpoint is called.
  • Authorisation: the decision about what an authenticated person is allowed to do or see.
  • Severity: a rating of how serious a vulnerability is.
  • Bounty: a reward paid to a researcher for reporting a valid vulnerability.
  • Recon: the information-gathering phase of security testing, where you map out what an application exposes.

More by codeslayer1337

View all

7 more disclosed reports, best first.

More from Omise

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.