From the Central Intelligence Agency to the C-suite, workplace romance has come at a high price in the last week.

On Friday came two big resignations: CIA chief David Petraeus stepped down from his post, citing an extramarital affair—an announcement that opened a Pandora’s box of concerns about national security and protocol for government investigations, to highlight just some of the fallout. That same day, incoming Lockheed Martin CEO Christopher Kubasik—who had served as Lockheed’s president and chief operating officer before being tapped for the top spot—was ousted after admitting to an improper relationship with one of his subordinates.

These are just the latest high-profile examples of an issue that has infiltrated workplaces and impacted careers for as long as there have been workplaces and careers to manage. For general counsel everywhere, experts in corporate governance and investigations say to pay attention to the legal risks of an employer-employee relationship—though there can be other issues lurking, as well.

For starters, the legal risks to the organization as a whole—including potential sexual harassment complaints and litigation—are often more clear-cut when an office affair involves a senior manager and a subordinate.

“When a general counsel is aware of an affair between an executive and a subordinate, there are legal risks they have to pay attention to, and may require them going to the board if the CEO won’t do it himself,” says Weil, Gotshal & Manges partner Holly Gregory, who focuses on corporate governance.

But while canoodling within the corporate chain of command tends to be forbidden, not many companies have polices expressly prohibiting extramarital affairs involving employees. So how to handle knowledge of an affair between an executive and someone who has no ties to the company can be a more challenging call for a GC.

“An extramarital affair with someone outside the company raises a different set of concerns concerning integrity, and presents a harder situation for the general counsel that will likely be impacted by company policy and culture,” Gregory says.

Depending on what’s stated in a company’s code of conduct or employee handbook, the corporation might take an especially dim view of such behaviors. “These kinds of affairs can cause damage to the company’s brand and the company’s respect in the community,” says David Gannaway, a financial fraud investigative specialist at Citrin Cooperman.

That’s not all, according to Gannaway, who also served as a special agent with the Internal Revenue Service. The motivations of the person who’s having the affair with the executive could also have bottom-line consequences for the company. For instance, “their motivation may be to obtain trade secrets” or other insider information, Gannaway says. Blackmail, revenge, and business-world prestige are potential factors, too.

And there’s the other money issue often raised by secret affairs: theft or misuse of company funds. That’s because many people either don’t want to risk a spouse eyeing charges on a personal account, or they just don’t have ready access to cash to buy doting gifts or plan clandestine getaways, Gannaway explains.

There are all kinds of ways a senior manager could turn the corporate treasury into a personal piggy bank, including through falsified expense reports or misuse of company credit cards. Gannaway says some people even go so far as to establish fictional vendors or engineer kickback schemes through an established vendor to get cash sent their way.

Before you know it, “the company has paid $10,000 for $5,000 worth of goods and services,” says Gannaway, with the balance going toward maintaining the affair.

So, it’s important to keep an open mind when starting an investigation into an affair, says attorney Philip Segal, who founded the investigative firm Charles Griffin Intelligence in New York.

“If someone’s breaking one rule,” he says, “maybe they’re breaking other rules.”

See also: “In Petraeus scandal, Congress concerned about DOJ’s information-sharing,” The National Law Journal, November 2012.