Until the foreclosure actually occurs--that is, until the landlord loses his house, and therefore is no longer your landlord--you have to pay him. If you do not, you could be evicted; unpaid rent could be taken out of your security deposit (if any); and/or you could be sued for the rent. Once the house is actually foreclosed upon and its owned by the bank or sold at a foreclosure sale, then you do not need to pay.