Order, Supreme Court, New York County (Charles E. Ramos, J.), entered February 2, 2005, which, to the extent appealed from, denied defendants’ motion to dismiss the first and fourth causes of action, unanimously modified, on the law, and the motion granted to the extent that the first cause of action is dismissed insofar as it alleges breach of contract between defendants and referred clients, and the fourth cause of action is dismissed insofar as it seeks an accounting and disclosure of documents relating to a global settlement agreement and payment of monies owed by defendants to the referred clients, and otherwise affirmed, without costs. Order, same court and Justice, entered on or about April 1, 2005, which granted plaintiff’s motion to compel production of documents to the extent of conducting an in camera review, unanimously modified, on the law, to direct an in camera review and then, depending on whether and to what extent the documents are found to *397be subject to disclosure and relevant to the remaining breach of contract cause of action, production of copies in which the identities of the nonreferred clients are redacted, and otherwise affirmed, without costs.
In the late 1990s, numerous personal injury actions were commenced throughout the country after the United States Food and Drug Administration recalled certain diet drugs, including Fenfluramine-Phentermine (Fen-Phen). Plaintiff law firm referred about 500 of these individuals to defendants. The actions were consolidated in federal court, but many of the plaintiffs in these actions opted out on defendants’ advice and brought lawsuits in state court (the underlying settlement action).
Defendants successfully negotiated a global settlement with American Home Products Corp., the manufacturer and distributor of Fen-Phen. As part of the settlement process, defendants retained a law school legal ethics professor, who rendered an opinion that defendants had complied with their ethical obligation to provide sufficient information for their clients to make an informed decision regarding the offer.
The court appointed a special master to review the settlement offers for fairness and to mediate disputes, if necessary. The special master concluded the settlement offers conformed to all ethical requirements and were reasonable and fair based on several criteria including the injuries sustained, causation, plaintiffs age, duration of use, and special damages. The special master specifically concluded the offers “bore no relation to attorney referral.”
Thereafter, by order dated November 7, 2001, the court (Helen E. Freedman, J.), confirmed the report, findings and confirmations of the special master and retained jurisdiction over any future matters involving the settlement. The court also issued a sealing order which applied to all of defendants’ Fen-Phen litigation cases in New York.
As a result of the settlement, plaintiff received approximately $5.3 million in referral fees pursuant to its fee-splitting agreements with defendants, which provided that plaintiff was entitled to between 40% and 50% of defendants’ fees.
Two days after the court approved the settlement, plaintiff commenced the instant lawsuit alleging, inter alia, that defendants breached their contracts with plaintiff and with their referred clients. Plaintiff also sought an accounting. In May 2003, many of the referred clients and plaintiff commenced a virtually identical action against defendants.
As relevant to this appeal, the underlying complaint asserts *398that defendants deliberately allocated more money to their direct clients than to plaintiffs referred clients so as to minimize the amount of referral fees owed to plaintiff. In addition, the pleading further alleges that defendants assessed millions of dollars in phony disbursements and expenses, thus decreasing the net settlement amount and thereby reducing plaintiffs referral fees. In January 2002, defendants moved to dismiss all but the fifth and sixth causes of action (both of which were unrelated to the Fen-Phen litigation) in plaintiffs complaint on the grounds of standing, collateral estoppel, documentary evidence and failure to state a cause of action.
In the meantime, plaintiff sought to intervene in the underlying settlement action in order to challenge the global settlement and sealing order. By order dated November 24, 2003, Justice Freedman denied the motion on the ground that plaintiff “has absolutely no connection with the [underlying] lawsuit whatsoever, inasmuch as it never claims that it referred this action to [defendants].” This order was never appealed, and its validity is not at issue on this appeal. However, given plaintiffs allegations of fraud, the court unsealed those records concerning the settlement with defendants’ clients on condition that confidentiality agreements be executed limiting dissemination of the information.
By decision and order dated January 20, 2005, the court (Charles E. Ramos, J), specifically noting that the fifth and sixth causes of action were not part of defendants’ motion, dismissed the second, third, seventh and eighth causes of action and denied that part of defendants’ motion to dismiss the first (breach of contract) and fourth (accounting) causes of action. Defendants appeal from so much of that order which sustained the first and fourth causes of action and also appeal from an order of the same court which granted plaintiffs motion to compel production of settlement documents for in camera review.
We modify both orders to the extent of dismissing those claims which plaintiff asserts on behalf of the referred clients and the related request for document production.
To the extent plaintiffs complaint alleges a cause of action for breach of contract between the referred clients and defendants, that claim should have been dismissed for failure to state a cause of action (see Truty v Federal Bakers Supply Corp., 217 AD2d 951 [1995]). Plaintiff has not alleged that it is a third-party beneficiary of any contracts entered into between defendants and the referred clients. Indeed, the complaint is devoid of any reference to or description of any contracts between the referred clients and defendants. In the absence of *399such claim, only the parties to a contract have standing to sue for its breach (see Artwear, Inc. v Hughes, 202 AD2d 76 [1994]; Crown Wisteria v F.G.F. Enters. Corp., 168 AD2d 238, 241 [1990]).
Even though plaintiff couches the remainder of its breach of contract claim as a challenge to its fee-splitting agreements with defendants, the real attack is to the underlying settlement and, more particularly, whether defendants engaged in any fraudulent conduct in ascertaining how much money referred clients, as opposed to direct clients, were entitled to receive as a settlement. The fee agreements between the parties are only an incidental aspect of the overall global settlement agreement in which over 5,000 individuals participated. The real issue is whether there was fraud behind the global settlement, a settlement which was agreed to by plaintiffs referred clients in the underlying action, approved by a recognized legal ethics professor, overseen and approved by a special master, and ultimately confirmed by the Supreme Court. Plaintiffs claim constitutes an improper collateral attack on a prior order (see Rakosi v Perla Assoc., 3 AD3d 431 [2004]). “The remedy for fraud allegedly committed during the course of a legal proceeding must be exercised in that lawsuit by moving to vacate the civil judgment (CPLR 5015 [a] [3]), and not by another plenary action collaterally attacking that judgment” (St. Clement v Londa, 8 AD3d 89, 90 [2004]; see also Crouse v McVickar, 207 NY 213, 217 [1912]).
To the extent the complaint alleges that defendants, in breach of their contract with plaintiff, charged plaintiff an assessment fee to which it did not agree, refused to pay any fees to plaintiff with respect to certain of the referred cases, and failed to contact certain clients or failed to prosecute their cases, resulting in certain clients not pursuing their claims, not finding new attorneys, or finding new attorneys who then referred the actions back to defendants to handle, those claims are not dismissed. Similarly, only those claims in the fourth cause of action relating to the remaining breach of contract claim are not dismissed. Accordingly, Supreme Court should conduct an in camera review, to the extent indicated, to determine which, if any, documents are relevant to the surviving breach of contract claims. However, in the event that any documents relating to nonreferred clients would be relevant to remaining claims, the identities of the nonreferred clients should be redacted. We have considered defendants’ remaining contentions and find them unavailing. Concur—Buckley, P.J., Marlow, Williams and Catterson, JJ.
Modification and/or resettlement denied; leave to appeal to the Court of Appeals denied; reargument granted and, upon re-*400argument, the decision and order of this Court entered herein on December 8, 2005 (24 AD3d 165 [2005]) recalled and vacated and a new decision and order is substituted therefor.