Tesla CEO Elon Musk has accused a Tesla employee of "quite extensive and damaging sabotage to our operations," according to an email obtained by CNBC. In the all-hands email to Tesla staff, Musk wrote that the employee had made "direct code changes" to the company's production systems, as well as exporting "large amounts" of Tesla's data to unknown third parties.

According to Musk's email, the unnamed employee claimed he had become disgruntled after failing to receive a promotion. However, the Tesla CEO also suggested the alleged saboteur could have been working with short sellers, oil and gas companies—whom he described as "sometimes not super nice"—or "the multitude of big gas/diesel car company competitors." Of this last group, Musk reminded his employees that, since the traditional OEMs have been known to cheat emissions tests, "maybe they're willing to cheat in other ways."

On Monday, Musk sent out another email to the company about yet another factory fire—the fifth by our count—alluding to the possibility of sabotage. And in 2016, one of Musk's other companies, SpaceX, asked to inspect the roof of a competitor's building following the explosion on the launchpad of one of SpaceX's rockets.

Tesla has faced plenty of criticism about its ongoing troubles in ramping up Model 3 production. But that may have been unwarranted if those problems were due to sabotage. We reached out to Tesla regarding CNBC's story, but the company declined to comment at this time.