if you buy a 2nd at foreclosure what happens to the 1st

looking at a foreclosure that has been through bankruptcy. The second is foreclosing, what happens with the first? Looks like the published bid takes out the second and the first.

The first remains if you buy a second and must be paid off in order to get clear title to the property. It is possible for a 2nd to advance funds to bring a first current and that advance may be included in the 2nds bid, but be very careful and do your best to verify that is actually the case before bidding. Be especially careful with hard money 2nds, as they have been known to play games with bid amounts.