The general counsel plays a key role in the event of a CEO suddenly stepping down or being pushed out of a company and should help draft a plan for such an instance, according to experts.

In the last week, the CEOs of WeWork Companies Inc., eBay Inc. and Juul Labs Inc. have resigned amid public scrutiny or disagreements with their respective boards of directors. In the event of a CEO suddenly stepping down or being forced out, the general counsel plays a crucial role in leading the company while the board searches for a new chief executive.

"It's very disruptive to the legal department," Lee Udelsman, managing partner at Major, Lindsey & Africa in New Jersey, said. "In a circumstance like an unplanned exit, you're going to have to have all hands on deck."

Udelsman said general counsel and chief legal officers have much greater visibility in the event of a CEO suddenly stepping down. He said they will work constantly with the board to help with the transition of a new CEO.

"The general counsel is viewed as the repository of the corporation's organizational memory," Udelsman said. "The general counsel probably knows the business better having provided legal support to the business."

Experts say there should always be a plan in place for when a CEO steps down, even if it is unexpected.

"I think it is incumbent upon the CLO to have a plan in place," Susanna McDonald, vice president and chief legal officer at the Association of Corporate Counsel, said.

Part of that plan should be consulting with outside counsel. Often at public companies, when a CEO leaves, the stock price will begin to fall, which could lead to litigation from stockholders. Mike Evers, the founder of Evers Legal, said one of the first things a general counsel should do in that event is to find a securities litigation expert at a law firm to address potential shareholder litigation.

"The general counsel should go into defense mode over potential litigation," Evers said.

While the company's top lawyer may not have a say in picking the next permanent CEO, he or she should have a conversation with the top candidates.

"The CLO should have a meeting with the top candidates to explain, with confidentiality in mind, the enterprise risks of within the organization," McDonald said.

The plan that the general counsel helps put into place should be reviewed at least every three years, McDonald said.

"Anytime there is a significant change within an organization, the people who were put on the interim CEO list leave or after any merger or acquisition," McDonald said. "These are all things that should be considered in an emergency succession plan."