Skip to content
IDOR Disclosed report Intermediate

IDOR to pay less for coin purchases on oauth.reddit.com via /api/v2/gold/paypal/create_coin_purchase_order in `order_id` parameter

The order_id parameter in the coin purchase API was not properly validated, allowing an attacker to substitute a cheaper order_id when purchasing a larger coin package. This let the attacker pay the lower price while receiving the larger amount of coins.

yanouhd Follow

Originally disclosed on HackerOne

Bounty$500 Medium 6.1 View original
  • Triaged in 46 hours
  • Fixed in 11 days
  • Paid in 11 days
  • Disclosed after 5 months

Summary:

This vulnerability consist of modifying the PayPal transaction ID to buy a big coin pack but paying the small price for it.

Impact:

The only impact here could be that you don't earn the money you deserve, and users can offer a lot of presents to other users, breaking the magic of the reddit community.

Steps To Reproduce:

Here are the steps to reproduce :

  1. Click on the PayPal button to buy the smallest package (1.99$ for 500 coins at the time of writing).

  2. By intercepting requests, you should see a POST to https://oauth.reddit.com/api/v2/gold/paypal/create_coin_purchase_order, with this body :

coins=500&pennies=199&correlation_id=b0fc62e4-e759-4b9e-be52-da4c926560ce

  1. The response to this request is an order_id, keep it aside. This is the order_id corresponding to a PayPal transaction with an amount of 1.99$.

{"order_id": "1CR56170K7852611T"}

  1. Cancel the order, then make a new one with a bigger package (I took the 3.99$ for 1100 coins for my tests.)

  2. Keep intercepting requests until you make it to the POST /api/v2/gold/paypal/create_coin_purchase_order one.

  3. Now instead of forwarding the real response, change the order_id of this order to the one you kept from the 1.99$ transaction.

{"order_id": "1CR56170K7852611T 1F444042JJ523625W"} 7. You will be redirected to the PayPal transaction page with an amount of 1.99$ to pay.

  1. Pay, and boom ! You paid 1.99$, but when you complete the order you will be given the amount of coins you "purchased" for the "fake price".

Supporting Material/References:

If you want to check my purchase history, here is the account I used for this exploit : u/YanvegHD (This is my personal account, I think I made a mistake and I should've used a test account, my apologise...)

reddit1.png
reddit1.png From the original on HackerOne
reddit2.png
reddit2.png

Impact

Breaks the reddit magic about rewarding people / and people kinda stealing your money.

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could pay less for a larger coin package, costing the platform revenue and letting users send many gifts.

What the attacker needed

A Reddit account; ability to intercept HTTP requests

How it was found

  1. Start buying the smallest coin package via PayPal.
  2. Intercept the POST request to create_coin_purchase_order and note the returned order_id.
  3. Cancel that order and start a new purchase for a larger package.
  4. Intercept the new create_coin_purchase_order request and replace its order_id with the cheaper one.
  5. Complete the PayPal payment at the lower price and receive the larger coin amount.

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 report has not been written yet. The Original tab links to the source.

When you buy coins, the server creates an order and gives it an ID. The bug is that the server trusted the ID you sent back without checking it matched the package you chose, so you could pay for a small pack but get a big one.

What is IDOR?

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.

More from Reddit

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.