There is nothing like a subpoena from New York Attorney General Eliot Spitzer to ruin a company's day. Just ask Express Scripts (NASDAQ:ESRX). In its second-quarter earnings release yesterday, the pharmacy benefit manager (PBM) disclosed that it received the legal notice, which alleges the firm breached contracts and broke civil law in its contract to manage prescription drug benefits for New York state employees.

Further, Express Scripts revealed that Vermont's attorney general has sent it a civil investigative demand, and subpoenas or investigative demands from attorneys general in 18 other states are on the way. Uh-oh.

These revelations overshadowed the company's quarterly results, which were actually fairly solid. Earnings came in at $65.4 million vs. $59 million in the same period last year, while cash flow from operations surged to $55.5 million from $26.2 million. Meanwhile, Express Scripts expanded its share repurchase program by 4 million shares.

All that's sort of hard to focus on, though, when the company in question is the subject of 20 separate investigations. Still, PBMs are no strangers to lawsuits. Caremark Rx (NYSE:CMX) is itself being probed by attorneys general from 19 states and is at the center of a major whistleblower case that accuses the company of all sorts of wrongdoing in its dealings with the state of Florida. Medco (NYSE:MHS) recently paid $29 million to settle suits with 20 states.

While it's hard to get excited about an industry embroiled in controversy, PBMs should not be ignored. Even with all the lawsuits, given their established infrastructure and ability to control costs by promoting generics and mail-order pharmacies, it's hard to imagine they would fade away. Express Scripts and its competitors will eventually emerge from the dark clouds hanging over them, and their stocks may then shine.

Fool contributor Brian Gorman is a freelance writer in Chicago. He does not own shares of any companies mentioned in this article.