Buy a lemon

To buy something that is worthless or does not work well.

The used car that I bought is not very good. I think that I bought a lemon.