All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It is permissible for the sale contract to state that the buyer mortgages his goods with the seller until the seller gets the entire price of the goods provided the ownership of the goods are transferred to the buyer as soon as the sale contract is conducted.
The Islamic Fiqh Committee resolution reads: "The seller has no right to preserve the ownership of the sold goods after the sale, however, it is permissible for the seller to condition on the buyer to mortgage the sold goods with him [the seller] in order to secure his right in getting the delayed instalments."
In case the buyer does not pay the entire price, the seller may take the matter to the Muslim ruler so that the latter will oblige the buyer to pay the price, and if he does not do so, the mortgage is sold in order to pay the (whole) price or what remains of it. If the buyer had given permission for the seller to sell the mortgage if he is unable to pay, then he may sell it without the permission of the Muslim ruler.
Therefore, you should know that your right is to get the price of the goods from the value of the mortgage if it is sold; as regards the mortgage itself, it is the property of the buyer as per the terms of the correct sale contract. Therefore, it is not correct or acceptable to take back the purchased car if the buyer did not pay the instalments, but you have the right to demand him to pay the instalments or to give you permission to sell the car so that you get your right from its price and then give the rest to the owner. However, if he does not give you permission, then you may take the matter to the court.
As regards the issue of buying mortgaged cars from the banks, then if the banks have the right to sell them, then this is permissible even if they were financed principally with Riba (interest and/or usury), as they have the right to sell them in order to get the capital money of the loan only, but not sell them in order to get the interests; because the interests are not owned by the banks. Allaah Says (what means): {…but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums).}[Quran 2:279]
Hence, if the banks sell the car just in order to get thier capital money, then it is permissible for you to buy it, but if they sell it with a price higher than its capital money, then it appears that it is not permissible for you to buy it from the banks as they sold it without right.
Allaah Knows best.