
    Ronald Jorgensen, Appellant, v Endicott Trust Company, Respondent.
   Appeal (1) from an order of the Supreme Court at Special Term (Ellison, J.), entered December 22, 1982 in Broome County, which granted defendant’s motion for summary judgment dismissing the complaint, and (2) from the judgment entered thereon, f Plaintiff purchased premises at 1602 Maine Road in the Town of Union, Broome County, at a mortgage foreclosure sale conducted December 17, 1979. Defendant initiated the prior foreclosure action as holder of first and second mortgages on the property, title to which had been held by Freer’s Meats, Inc. The instant controversy centers on a subordinate third mortgage assigned to Leroy and Virginia Freer in May of 1978. In its foreclosure complaint, defendant alleged the existence of the third mortgage, but did not set forth the assignment to the Freers. The Freers were, however, named as third-party defendants by the trustee in bankruptcy of their corporation, 1602 Maine Road Corporation, doing business as Freer’s Meats, Inc., who alleged that the assignment of the mortgage to the Freers was null and void. Plaintiff contends that since the Freers were not named as parties in the foreclosure action (RPAPL 1311, subd 3), this third mortgage was not extinguished and has created a cloud on plaintiff’s title. The complaint alleged four causes of action: (1) specific performance to convey good and marketable title; (2) negligence in failing to properly name the Freers as necessary parties; (3) fraud in failing to inform plaintiff of the third mortgage; and (4) breach of contract to convey good and marketable title. Special Term granted defendant’s motion for summary judgment dismissing the complaint for failure to state a cause of action (CPLR 3211, subd [a], par 7; subd [c]), giving rise to this appeal. 11 There should be an affirmance. Initially, we note that the appropriate remedy for a purchaser at a foreclosure sale in an instance where a necessary party has not been included is not an action for damages, but one to either set aside the sale or to reforeclose pursuant to RPAPL 1503 (see 2035 Realty Co. v Howard Fuel Corp., 77 AD2d 870). Second, in arguing that defendant breached its duty to convey marketable title, plaintiff misconstrues the nature of the judicial sale. At a foreclosure proceeding, the actual sale is made by the referee, as an officer of the court, and the contract is basically between the purchaser and the court (Lane v Chantilly Corp., 251 NY 435, 437-438; 2 Klein, Mortgages & Mortgage Foreclosure in New York [rev ed], § 36:17, p 276). The referee’s deed conveys only the interests of the foreclosure parties (RPAPL 1353), and provides neither an express nor implied warranty of title. Nor may plaintiff rely on alleged representations of defendant’s attorneys to create an implied warranty of marketability (Real Property Law, § 251). Since plaintiff’s contract was with the referee, not defendant, Special Term properly determined that the causes of action for breach of contract and specific performance must fail. 11 We further conclude that plaintiff has failed to demonstrate the existence of an actual defect in title. As a general rule, a purchaser at a foreclosure sale is entitled to a good, marketable title (Heller v Cohen, 154 NY 299, 306). Such a purchaser may be relieved from his purchase in the event a necessary party was not named in the foreclosure action, since nonjoinder permits a party’s interest to survive the judgment (Verdin v Slocum, 71 NY 345; 2 Klein, Mortgages & Mortgage Foreclosure in New York [rev ed], § 36:16, p 274). Here, the Freers were not named as a party defendant in the foreclosure action (see RPAPL 1311, subd 3). However, several facts exist demonstrating a waiver of any lien they may have had. As third-party defendants, the Freers enjoyed the rights of a party adverse to all other parties in the action (CPLR 1008). To protect their interests as holders of a junior mortgage, they had a duty to plead any defenses available to them and, having failed to do so, they have waived any rights to redeem (Dorff v Bornstein, 277 NY 236, 241). Additionally, the third-party claims of the bankruptcy trustee were settled by a stipulation dated February 3,1979, which effectively converted the Freers’ mortgage into a claim against any surplus funds held by the bankruptcy trustee. Finally, the Freers would be estopped from asserting their lien as third mortgagee since, as officers and directors of Freer’s Meats, Inc., they had full knowledge of the foreclosure action from its very inception (see Mandelino v Levy, 49 Misc 2d 134). Under these collective circumstances, we are of the view that the referee’s deed conveyed marketable title and resulted in “an entire bar” against the Freers’ interest (RPAPL 1353, subd 3). 11 Since the basis for the entire complaint was the alleged lack of clear title, there were no triable issues of fact remaining to preclude the award of summary judgment in defendant’s favor. $ Order and judgment affirmed, without costs. Kane, J. P., Main, Weiss, Mikoll and Yesawich, Jr., JJ., concur.  