Civil Code § 2854
ARTICLE 7. Position of Sureties
A creditor is entitled to the benefit of everything which a surety has received from the debtor by way of security for the performance of the obligation, and may, upon the maturity of the obligation, compel the application of such security to its satisfaction.