Tesla's attempt to ramp up Model 3 production may have hit a new stumbling block --- employee sabotage.

In an email to Tesla employees late Sunday night, CEO Elon Musk says that an unnamed employee admitted to sabotaging the company's Freemont, California plant. The problem comes as Tesla scrambles to boost production of its Model 3 sedan to 5,000 a week by early July -- the rate at which Musk says the company can become profitable.

Shares of Tesla (TSLA) fell about 5% in trading Tuesday.

Musk said the Tesla employee had confessed to "quite extensive and damaging sabotage to our operations." The email said the employee made changes to the computer code of the company's manufacturing operating system. The employee also exported large amounts of highly sensitive company data to unknown third parties.

Related: Elon Musk spends his own money to buy Tesla shares, again

"His motivation is that he wanted a promotion that he did not receive. In light of these actions, not promoting him was definitely the right move," Musk wrote. The email did not say whether the employee had been fired.

The CEO also cautioned that there may be more to the situation than he knows, and suggested that non-employees who simply want Tesla to fail could also be involved.

"There are a long list of organizations that want Tesla to die," Musk wrote. "These include Wall Street short-sellers, who have already lost billions of dollars and stand to lose a lot more. Then there are the oil & gas companies, the wealthiest industries in the world -- they don't love the idea of Tesla advancing the progress of solar power & electric cars. Don't want to blow your mind, but rumor has it that those companies are sometimes not super nice. Then there are the multitude of big gas/diesel car company competitors. If they're willing to cheat so much about emissions, maybe they're willing to cheat in other ways?"

Despite the company-wide email, Tesla declined to comment on the alleged sabotage. The email about the sabotage was first reported by CNBC.

Related: Tesla spontaneously catches fire with no crash

Musk asked employees to be extremely vigilant about Model 3 manufacturing.

The revelation was followed by a second email to employees early Monday that detailed a small fire Sunday evening, which the company said briefly halted the production line but was quickly extinguished. There were no injuries or significant equipment damage, according to Musk. The cause of the fire was not immediately known.

"Could just be a random event, but as Andy Grove said, 'Only the paranoid survive,'" wrote Musk, referring to a remark attributed to the late CEO of Intel (INTC). "Please be on the alert for anything that's not in the best interests of our company."

Not everyone is convinced that Tesla will hit its production target, given that it's missed many of these goals in the past. Those critics argue that Tesla could run into a cash crunch later this year if the company doesn't hit 5,000 Model 3's a week.

Musk has countered that there won't be any need to raise additional cash.

Correction: This story has been updated to reflect that Tesla is aiming to build 5,000 Model 3's a week rather than 5,000 a day.