At any sale of real or personal property upon which there is a mortgage, pledge, or other lien, the holder of such lien may become the purchaser, and may apply the amount of the lien on the purchase price in the following manner. If no claim thereon has been filed or allowed, the court, at the hearing on the report of sale and for confirmation of the sale, may examine into the validity and enforceability of the lien or charge and the amount due thereunder and secured thereby, and may authorize the personal representative to accept the receipt of such purchaser for the amount due thereunder and secured thereby as payment pro tanto. If such mortgage, pledge, or other lien is a valid claim against the estate and has been allowed, the receipt of the purchaser for the amount due the purchaser from the proceeds of the sale is a payment pro tanto. If the amount for which the property is purchased, whether or not a claim for it has been filed or allowed, is insufficient to defray the expenses and discharge the mortgage, pledge, or other lien, the purchaser must pay an amount sufficient to pay the balance of such expenses. Nothing permitted under the terms of this section shall be deemed to be an allowance of a claim based upon such mortgage, pledge, or other lien.
Iowa Code § 633.393