The general rule is that one may not sue an attorney, unless that attorney was working for you. Privity is the concept that the attorney was hired by you, and worked for you. You may not sue the other party’s attorney, no matter how badly you were treated in court by that attorney.
As in all things, there are exceptions. Fraud, malicious behavior, and special circumstances might allow plaintiff to sue an attorney not his own. It did not work in this case, however. Fred W. Nelson, etc., respondent, v Stanley Kalathara, v. Claude Simpson, SUPREME COURT OF NEW YORK, APPELLATE DIVISION, SECOND DEPARTMENT 2008 NY Slip Op 1313;
"A predecessor guardian had sold property belonging to the incapacitated person. The lawyer represented the purchasers and the purchasers’ lender in that transaction. The successor guardian alleged that the predecessor guardian misappropriated, inter alia, funds that were received from that closing that belonged to the incapacitated person. The appellate court held that the successor guardian’s allegations against the lawyer, that by virtue of his role in the real property sale, he knew or should have known that the incapacitated person would rely on his skills as an attorney to issue checks payable to the guardian, and not to the predecessor guardian individually, did not fall within the narrow exception of fraud, collusion, malicious acts, or other special circumstances under which a cause of action alleging legal malpractice may have been asserted absent a showing of actual or near-privity. "