I expect that most plaintiffs in derivative actions do not expect to pay a defendant's attorneys' fees if they lose because under the "American Rule" each side pays their own attorneys' fees, regardless of who wins. A contract may, of course, provide that the prevailing party may recover fees and California Civil Code Section 1717 makes such a provision reciprocal even when it is one-sided. However, a contractual right to recover attorneys' fees would not seem to be at issue when the derivative action is based on tort claims, such as breach of fiduciary duty.
In a recent opinion, however, the Fourth District Court of Appeal held that an unsuccessful plaintiff in a derivative action was personally liable for the defendant's attorneys' fees even though the plaintiff's action was based on tort. How could this be? I'll let the court explain:
Lintz's [the plaintiff] derivative causes of action against Dohr [the defendant] were for breach of fiduciary duty, fraud, and fraudulent concealment. These causes of action were not on a contract: They were tort causes of action and did not seek to enforce or invalidate the stock repurchase agreement. But the attorney fees provision in the stock repurchase agreement was drafted broadly enough to authorize recovery of attorney fees incurred in connection with the derivative tort causes of action against Dohr. Lintz, though not a signatory to the stock repurchase agreement, is personally liable for the fees because, as a shareholder bringing a derivative lawsuit, she stands in the shoes of Sterling [the corporation], which was a party to that agreement.
Dohr v. Lintz, 2021 Cal. App. Unpub. LEXIS 1938.
The Court of Appeal also found that Section 800 (which allows a defendant in a derivative action to seek a court order requiring a bond) did not limit the plaintiff's liability:
Corporations Code section 800 does not limit Lintz's personal liability to a $50,000 bond she posted because section 800 is not the statutory basis for the award of attorney fees.
The opinion is unpublished, meaning that it generally may not be cited or relied upon by courts or parties under Rule 8.1115 of the California Rules of Court.