Sayyiduna Ali (may Allah be pleased with him) said: When the pledge is worth less than the loan, the remainder must be paid upon its loss; and if the pledge is worth more, it goes in exchange for the loan. Imam al-Shafi'i (may Allah have mercy on him) said: The narration of Sayyiduna Ali (may Allah be pleased with him) stating that the two parties return the excess to each other is more authentic from him than the narration of Abd al-A'la. We have seen your companions declare this report of Abd al-A'la severely weak even when no contrary report opposes it; so how much more so when it is opposed by a report that is closer to authenticity and more deserving of it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرهن / 11234