The U.S. spies on other nations and in turn gets spied on. I don't think I need a citation to prove this.
Every now and then, there are people who gain access to highly classified information and transfer it. You don't have to go far to find a long instance of issues. Furthermore, there are spies who may rise to high ranks in a Secret Agency and do serious damage or transfer even more sensitive information. Scientology did a coordinated effort of this. You may even have a spy that ends up becoming the President, who does not need a clearance.
How does an agency, like the FBI or CIA, know if a major part of its hierarchy is compromised from a purely espionage perspective?