
    Sostenes PENA; Yolanda Pena, Plaintiffs-Appellants, v. HSBC BANK USA, NATIONAL ASSOCIATION as Trustee for Deutsche Alt-A Securities Mortgage Loan Trust, Series 2007-OA2; Surety Trustees, LLC, Defendants-Appellees.
    No. 14-2329.
    United States Court of Appeals, Fourth Circuit.
    Submitted: Nov. 4, 2015.
    Decided: Dec. 28, 2015.
    
      Christopher E. Brown, Tucker & Associates PLLC, Vienna, Virginia, for Appellants. John C. Lynch, Maryia Y. Jones, Jennifer E. Bowen, Troutman Sanders LLP, Virginia Beach, Virginia, for Appel-lees.
    Before DUNCAN, KEENAN, and DIAZ, Circuit Judges.
   Affirmed by unpublished PER CURIAM opinion.

Unpublished opinions are not binding precedent in this circuit.

PER CURIAM:

This case concerns the efforts of Plaintiffs-Appellants Sostenes and Yolanda Pena to retain possession of their real estate in Loudoun County, Virginia,' after they defaulted on their mortgage loan and the property was sold at a foreclosure sale. Defendant-Appellee HSBC Bank USA N.A. (“HSBC”), as Trustee for Deutsche At-A Securities Mortgage Loan Trust, Series 2007-OA2, was the beneficiary of the deed of trust associated with the Pe-nas’ loan, and purchased the property at the foreclosure sale. After the sale, the Penas sued HSBC, raising several claims premised on their assertion that the assignment of the deed of trust from the Penas’ original lender to HSBC was invalid.

The district court granted HSBC’s motion to dismiss the Penas’ complaint for failure to state a claim, holding that the Penas lack standing to challenge the assignment. For the reasons that follow, we affirm.

I.

Because this case arises at the motion-to-dismiss stage, we “assum[e] all well-pleaded, nonconclusory factual allegations in the complaint to be true.” Aziz v. Alcolac, Inc., 658 F.Bd 388, 391 (4th Cir.2011). In addition to the complaint itself, we may consider “documents attached to the complaint, ... as well as those attached to the motion to dismiss, so long as they are integral to the complaint and authentic.” Philips v. Pitt Cty. Mem’l Hosp., 572 F.3d 176, 180 (4th Cir.2009). We may also “take judicial notice of matters of public record.” Id.

The Penas’ complaint and the associated documents reveal the following facts: The Penas purchased the property at issue on February 5, 2007. To finance their purchase, the Penas obtained a loan from IndyMac Bank, F.S.B. (“IndyMac”). The loan was secured by a deed of trust on the property. Instead of identifying itself as the trust beneficiary, IndyMac appointed a separate company called Mortgage Electronic Registration Systems, Inc. (“MERS”) as the “nominee” for IndyMac and IndyMac’s “successors and assigns,” and MERS became the trust beneficiary. J.A. 81.

On July 27, 2010, July 29, 2010, and June 11, 2013, respectively, MERS executed and recorded three separate documents, each entitled “Assignment of Deed of Trust.” Each document purported to assign to HSBC “all beneficial interest” under the Penas’ deed of trust. J.A. 63-66. HSBC, in turn, appointed Surety Trustees, LLC (“Surety Trustees”) as a substitute trustee in place of Trust Title Company, which had been named trustee in the original deed of trust. After the Penas defaulted on their loan, HSBC instructed Surety Trustees to initiate foreclosure proceedings. At the foreclosure sale, HSBC purchased the property.

II.

In their complaint, the Penas seek various types of relief from the foreclosure sale, asserting that MERS’s assignment of the deed of trust to HSBC was invalid, and that HSBC therefore had no authority to appoint Surety Trustees as a substitute trustee and no authority to instruct Surety Trustees to initiate foreclosure proceedings. The district court, in granting HSBC’s motion to dismiss, held that the Penas lack standing to challenge MERS’s assignment of the deed of trust to HSBC. We review de novo a district court’s decision to grant a motion to dismiss for failure to state a claim. Aziz, 658 F.3d at 391.

On appeal, the Penas do not dispute the basic principle of Virginia law that “generally, one who is not in privity of contract cannot attack the validity of the contract.” Wells v. Shoosmith, 245 Va. 386, 428 S.E.2d 909, 913 (1993); see Mich. Mut. Ins.Co. v. Smoot, 129 F.Supp.2d 912, 920 (E.D.Va.2000) (stating that, under Virginia law, “[o]ne must be a party to, or a beneficiary of, a contract to sue on that contract”). Nor do the Penas claim that they were in fact parties to, or beneficiaries of, the assignment of the deed of trust from MERS to HSBC.

Instead, the Penas argue that their complaint seeks only to enforce the conditions precedent to foreclosure contained in the deed of trust (to which they are a party), and point out that under Virginia law, “[b]orrowers may sue to enforce conditions precedent to foreclosure,” Mathews v. PHH Mortgage Corp., 283 Va. 723, 724 S.E.2d 196, 200 (2012). And indeed, the Penas do allege in their first amended complaint that “several conditions precedent” to foreclosure “were not satisfied.” J.A. 23, Specifically, the Penas allege that

— The lender ... did not declare a default, nor give notice thereof
— The Lender did not accelerate the Note, nor give notice thereof
— The Lender did not appoint' the substitute trustee
— The Lender did not advise the borrower in the notice of the right to cure ... that she had the right to file a court action and raise any defense
— Lender provided no notice of the sale as required by the contract and Virginia law.

J.A. 23-24.

The Penas’ briefing on appeal makes clear, however, that they are not alleging that they never received notice of their default and of the impending foreclosure. In fact, the record contains several letters that provided the Penas with such notice. See J.A. 112-22. The Penas’ only contention is that they were provided such notice by the wrong entity: the deed of trust requires that notice be provided by the Lender (or its agents), and according to the Penas, HSBC is not the Lender. Of course, the Penas’ assertion that HSBC is not the Lender is entirely dependent on them challenge to the validity of the assignment from MERS to HSBC — a challenge that they have no standing to raise. Thus, even though the Penas’ complaint is styled as a suit to enforce the deed of trust, it is clear that, at bottom, their suit seeks only to challenge a contract to which they are neither parties nor beneficiaries. Virginia law provides no avenue for such a challenge.

III.

For the foregoing reasons, the district court’s order dismissing the Penas’ complaint is

AFFIRMED. 
      
      . Specifically, jn Count I, the Penas seek rescission of the foreclosure sale; in Count II, they request removal of a cloud on title; and in Count III, they seek damages for slander of title. The Penas also asserted a breach-of-contract claim against HSBC in Count IV, but they do not contest the district court's dismissal of that claim on appeal.
     
      
      . Federal prudential standing doctrine likewise contains a "general prohibition on a litigant’s raising another person's legal rights.” CGM, LLC v. BellSouth Telecomm., Inc., 664 F.3d 46, 52 (4th Cir.2011) (quoting Allen v. Wright, 468 U.S. 737, 751, 104 S.Ct. 3315, 82 L.Ed.2d 556 (1984)).
     