As long as the company hasn't found it, you are good to go.
If the losses are monetary, the company will let you go, as they cannot win legally, unless they had mentioned it in their T & C (very unlikely)
If the losses are extreme, like stealing private information, or trying to hack, the company will sue you
I had a friend during my B.Tech, who would use Uber app to make tons of money - so much that he bought a phone worth Rs 17k , even when he was relying on scholarship money to pay for hostel and University fees. Of course, he used some illegal means, but it wasn't illegal at that time. Also, we were in a Govt. University, so the price wasn't extremely high compared to private ones.
I read somewhere during that same year that a person had found out about a (non IT related) bug in Uber app, by which he could bypass the entire payment page, and get the ride for free. He informed Uber about this, and got free rides for life or for a year (one of them).
So, to be extremely very sure, read their Terms and Conditions about exploitation.
Also, talking about the bug on Amazon, I think many people take advantage of it, and I haven't heard anyone getting dragged to court, so you are good to go. Even there is a Telegram channel about such bugs.
It seems like Telegram is the Swiss Bank of all loopholes of companies.