Medco ( MHS) could soon find out that cheap cures don't always last.

Until recently, the giant pharmacy benefit manager had expected to pay $42.5 million to settle a major class-action lawsuit. But an appeals court ruling will force a federal judge who presided over the case to re-examine the deal, raising the prospect that the settlement could collapse.

Medco has been accused of improperly favoring expensive drugs, especially those sold by former parent Merck ( MRK - Get Report), and then pocketing manufacturer rebates that should have gone to its clients instead. The $42.5 million settlement was negotiated three years ago, with Medco admitting no wrongdoing. Medco says it settled only to put the legal expense and burden involved behind it.

But the settlement hasn't ended the controversy over the case. The appeals court has challenged the legitimacy of some plaintiffs who settled on behalf of some 815,000 health plans in the suit. Four of the plaintiffs are simply individuals, the court points out, who have not shown that they were personally injured by Medco's alleged misconduct. And a fifth, it notes, is a health plan that has so far failed to prove that it ever had a contract with the big PBM.

The sixth plaintiff, a trustee for the Blumenthal Print Works represented by attorney Linda Cahn, has from the beginning rejected the settlement as inadequate. Meanwhile, 200 other Medco clients have declined to participate in the deal and left the door open for their own lawsuits instead.

Some plaintiffs are clearly hoping they can get more money out of Medco if the settlement is set aside. In a high-profile case that went to court earlier this month, the Cincinnati Enquirer has reported, a single health plan -- the Ohio state teacher retirement system -- is seeking $152 million in damages from Medco based on allegations resembling those levied in the class-action complaint. In the meantime, the federal government has already secured $137.5 million from a Medco competitor in another similar case.

David Machlowitz, general counsel for Medco, offered a mixed reaction to the ruling.

"I'm not sure yet whether this is a good thing or a bad thing," Machlowitz told TheStreet.com on Thursday. "It might be a very good thing. I think it's unlikely to become a bad thing. But it could be an aggravating thing."

Medco's stock jumped 1.8% to an all-time high of $57.80 on Friday.

Right to Sue?

For its part, Medco has argued all along that the individual plaintiffs who filed the class-action lawsuit had no right to do so. Moreover, the law firm that represented those plaintiffs -- led by high-profile attorney David Boies -- nearly conceded as much when attempting to justify collecting $12.75 million in legal fees for the case.

"In the years since these actions were commenced, several courts have questioned the standing of participants and beneficiaries to sue for the benefit of plans in the absence of some showing of direct injury to the participants themselves, and a very similar action has been dismissed for lack of such standing," the firm stated in a passage cited by the court. "The risk of having these cases dismissed in their entirety on this or other grounds was very real."

The court then goes on to portray the trustee for Blumenthal -- the lone holdout on the settlement -- as a proper plaintiff with the legal standing necessary to file the complaint. Cahn appears to have left the Boies law firm during settlement negotiations, with Blumenthal following her as a client.

Cahn has long suggested that Medco bilked its clients out of billions of dollars and that the lawyers had no business settling for such a small amount. An assistant to Boies told TheStreet.com on Thursday that the lawyer -- his star tarnished recently by conflict scandals -- would not be offering any comments to the media.

Matter of Debate

In the meantime, Medco is looking on the bright side.

For starters, Medco says that a number of similar lawsuits will disappear if the court bars individuals from suing companies on their health plans' behalf. In addition, Medco believes that it may now have a new weapon to fight the remaining lawsuits -- filed by actual health plans -- still pending in the group.

Those lawsuits, Machlowitz explains, are based on the premise that Medco serves as a fiduciary under the Employee Retirement Income Security Act. However, he says, a recent court ruling in Maine states that PBMs do not function as fiduciaries under ERISA at all.

If that is the case, he adds, all of the ERISA-based lawsuits could ultimately go away. Medco hopes to see the matter, described by Machlowitz as admittedly complex, addressed by the court as early as next month. The company continues to face a slew of other, non-ERISA complaints in the meantime.

But some legal experts, who are familiar with the PBM litigation, say the Maine case never set out to address the ERISA issue directly.

"I sponsored the law," says Sharon Treat, a former Maine senator who now serves as executive director of the National Legislative Association on Prescription Drug Prices. "The PBMs tried to say that we were making them ERISA fiduciaries. But the Maine law isn't really about ERISA. It's about governing the relationship between PBMs and whoever hires them."

Cahn echoes that view.

"There are cases all over the country on this issue right now," she says. "But the Maine case is not about ERISA duty. Ours is. We're going to litigate it, and we believe we will prove that Medco -- and all PBMs -- are ERISA fiduciaries" under law.

Get Jim Cramer's picks for 2006.