There is no foundation for the objection that the complainants have not disclosed the nature of the trust upon which they hold the bonds and mortgages assigned to them by Beers, or the names of the cestuis que trust. It is not alleged in the bill that the bonds and mortgages were assigned to the complainants upon any trust whatever; and for aught that appears, the addition of the word trustees after their names, is a mere matter of description. If the mortgages have been assigned upon trusts which are illegal, or upon trusts which require that the cestuis que trust should be brought before the court as parties, that is a distinct matter of defence which must be set up by plea or answer, and cannot be raised upon a demurrer to a bill which shows no illegality or want of necessary parties upon its face.
The objection for the multifariousness is equally untenable. Both mortgages are upon the same premises, and Murray, the assignor, had guarantied the payment of the second mortgage, in his assignment to Beers, and the defendant had guarantied the same by his bond to Murray. And if the assignees of Beers are entitled to the benefit of *435those guaranties, then both Murray and Allen were properly made defendants, in connection with the mortgagor and subsequent claimants under him ; pursuant to the authority-given to the complainant by the article of the revised statutes relative to the powers and proceedings of this court upon bills for the foreclosure or satisfaction of mortgages. (2 R. S. 191.) It, therefore, only remains to consider whether the present assignees of the mortgage given to Murray are entitled to the benefit of the bond given by the defendant Allen to Murray guaranteeing the payment of that mortgage debt.
The bond of the defendant Allen was given to Murray, and of course was not assignable so as to enable the present holders of the mortgage to sue thereon in their own names in a court of law. And as it was in fact given, according to the statement in the complainants’ bill, subsequent to the assignment of the bond and mortgage to which it was intended to be a collateral security, it is only upon a principle of equity that the present holders of Tyler’s bond and mortgage to Murray are entitled to the benefit of this collateral bond. It is well settled, however, that where a surety, i or a person standing in the situation of a surety for the payment of a debt, receives a security for his indemnity and to discharge such indebtedness, the principal creditor is in equity entitled to the full benefit of that security. And it makes no difference that such principal creditor did not act upon the credit of such security in the first instance, or even know of its existence. Thus in Maure v. Harrison, (1 Eq. Ca. Abr. 93,) it was held that in equity a bond creditor was entitled to the benefit of all counter bonds or collateral securities given by the principal debtor to his surety. And that the holder of a bond was, therefore, entitled to the benefit of a bond and mortgage given by the principal debtor to his surety in the bond, for the indemnity of such surety. So in the case of Ex parte Perfect, (Mont. Bank. Rep. 25,) the vice chancellor of England decided that the endorser of a bill of exchange had an equitable claim to property deposited with the drawee as security against the *436payment of the bills accepted by him. The same principle was acted on by the supreme court of this state in the case of the Bank of Auburn v. Throop, (18 John. Rep. 505,) upon an application to the equitable powers of that court. (See also Parsons v. Buddock, 2 Vern. Rep. 608; Waring and others, Ex parte, 19 Ves. 345; Ex parte Parr, Buck’s Bank Ca. 191; Ex parte Prescott and others, 3 Deac. & Chitty’s Rep. 218.)
In the case under consideration, Murray had assigned the bond and mortgage given to him, and had guarantied the payment thereof to the assignee. He, therefore, stood in the situation of a surety for the mortgagor, when the latter procured the bond of Allen as a collateral security, or as a guaranty of the payment of his original bond and mortgage. The present holders are, therefore, in equity, entitled to the benefit of this collateral bond, in the same manner and to the same extent as if it had been given to Murray before he assigned his bond and mortgage, and had been expressly assigned by him to Beers, and by Beers to the complainants. The provision of the revised statutes, before referred to, is sufficiently broad to reach this case ; so as to enable the court to make a decree over against the defendant Allen for the payment of the deficiency upon the second bond and mortgage, in case there should be a deficiency which cannot be collected from the mortgagor, who is primarily liable therefor. And if it cannot be collected from either of those defendants, the decree may then authorize the complainants to take out execution for the deficiency against Murray, who is also liable for the payment of the mortgage debt in consequence of the guaranty contained in his assignment to Beers.
The demurrer is therefore overruled with costs. And the defendant Allen must pay the costs and put in his answer within twenty days, or the bill may be taken as confessed against him.