Dr. Monzer Kahf, a prominent Muslim economist and counselor, answers: “Selling and buying real estate and mediation in such transactions are all permissible. However, Riba-based mortgage is haram. It may become permissible under conditions of dire necessity, according to the Fatwa of the First International Fiqh Conference in North America, held in Detroit, Oct. 1999. It is also permissible for families that have conditions of substantial inconvenience.
Working in real estate mediation and in finding suitable finance for people under such conditions is, by consequence, permissible.
Foreclosures are sales by the lender/mortgage holder after a default on the part of debtor/owner; it is permissible as long as there is no injustice involved, such as grossly sacrificing the debtor’s interests. Under this condition, it is permissible to sell and buy from foreclosures.”