Faster FastAPI

Description

I wanted to get an ECommerce Portal. A dev on Upwork said that he will build it using FastAPI in Python. I have read that Python is very slow, but he assured me that he can make python super fast using some tricks that he know. Honestly, I don't trust this guy. Can you test the site for any bugs or vulnerabilities? I will pay you for your time by giving you a free access to the admin lounge. Just give me the coupon code for that.

Flag format: d4rk{..}c0d3 / d4rk{..}c0de both accepted

http://64.227.131.98:40000/arrow-up-right

Solution

Application:

fasterapi-1

You have 2 choices, buy normal coupon or buy admin coupon (flag). I fired up the BurpSuite and intercepted buy request.

What happens if we change quantity to 0?

circle-check

Unintended Solution

If you buy normal ticket json data looks like:

It's not an object, but list of objects which I found amusing.

Just like in Jerry & Marge Go Largearrow-up-right

  1. Find a loophole

  2. Exploit the loophole

Loophole in our case is to change quantity to 0, meaning we buy winning coupon at no cost. The exploit is similar to the story, just buy tons of tickets and you'll eventually cash out.

I think the scenario would have been valid if you couldnt pass quantity to buy the flag.

Last updated