*613To state a cause of action to recover damages for legal malpractice, a plaintiff must allege that the attorney “failed to exercise the ordinary reasonable skill and knowledge commonly possessed by a member of the legal profession,” and that the breach of this duty proximately caused the plaintiff to sustain actual and ascertainable damages (Leder v Spiegel, 9 NY3d 836, 837 [2007] [internal quotation marks omitted], cert denied sub nom. Spiegel v Rowland, 552 US 1257 [2008]; see Rudolf v Shayne, Dachs, Stanisci, Corker & Sauer, 8 NY3d 438, 442 [2007]; McCoy v Feinman, 99 NY2d 295, 301-302 [2002]; Gioeli v Vlachos, 89 AD3d 984 [2011]; Dempster v Liotti, 86 AD3d 169, 176 [2011]). “To establish causation, a plaintiff must show that he or she would have prevailed in the underlying action or would not have incurred any damages, but for the lawyer’s negligence” (Rudolf v Shayne, Dachs, Stanisci, Corker & Sauer, 8 NY3d at 442; see Gioeli v Vlachos, 89 AD3d 984 [2011]; Snolis v Clare, 81 AD3d 923, 925 [2011]; Cervini v Zanoni, 95 AD3d 919 [2012]).
Here, accepting as true the facts alleged in the complaint and according the plaintiff the benefit of every favorable inference (see Leon v Martinez, 84 NY2d 83, 87-88 [1994]; AG Capital Funding Partners, L.P. v State St. Bank & Trust Co., 5 NY3d 582, 591 [2005]; Goshen v Mutual Life Ins. Co. of N.Y., 98 NY2d 314, 326 [2002]; Polonetsky v Better Homes Depot, 97 NY2d 46, 54 [2001]; Guggenheimer v Ginzburg, 43 NY2d 268, 275 [1977]; Peery v United Capital Corp., 84 AD3d 1201 [2011]; Sokol v Leader, 74 AD3d 1180, 1180-1181 [2010]; Reid v Gateway Sherman, Inc., 60 AD3d 836, 837 [2009]; Roth v Goldman, 254 AD2d 405, 406 [1998]), the complaint adequately stated a cause of action to recover damages for legal malpractice by alleging that during its representation of the plaintiff in an underlying lien foreclosure action, the defendant negligently filed an unverified notice of lien (see Real Property Law §§ 339-z, 339-aa), and that such negligence proximately caused the plaintiff to incur increased legal expenses by having to defend the validity of the *614lien against challenges by the defendant in the underlying action (see VDR Realty Corp. v Mintz, 167 AD2d 986 [1990]; Wolstencroft v Sassower, 124 AD2d 582, 582 [1986]). Further, the fact that the plaintiff may ultimately prevail in the underlying action is not an intervening cause requiring dismissal of this action (see Fireman’s Fund Ins. Co. v Farrell, 289 AD2d 286, 288 [2001]; Home Ins. Co. v Liebman, Adolf & Charme, 257 AD2d 424 [1999]; VDR Realty Corp. v Mintz, 167 AD2d 986 [1990]; Wolstencroft v Sassower, 124 AD2d at 582; see also DePinto v Rosenthal & Curry, 237 AD2d 482, 482 [1997]).
The defendant’s remaining contentions are without merit.
Accordingly, the Supreme Court properly denied those branches of the defendant’s motion which were to dismiss the complaint for failure to state a cause of action and pursuant to the doctrines of judicial and collateral estoppel. Angiolillo, J.P., Belen, Roman and Sgroi, JJ., concur.