We're headed for a 'cyber Pearl Harbor,' says Adm James Stavridis

The U.S. has a pressing need to bolster its weak cybersecurity in the face of huge breaches like Russia's suspected sabotage of the election system and Yahoo's billion-user hack, Ret. Adm. James Stavridis told CNBC on Thursday.

"It is the greatest mismatch between the level of threat, very high, and the level of preparation, quite low," the former NATO Supreme Allied Commander told "Squawk Box."

"We're headed toward a cyber Pearl Harbor, and it is going to come at either the grid or the financial sector," he said, echoing a term used by then Defense Secretary Leon Panetta in 2012.

The two nations that pose the biggest threats to the United States are Russia and China, Stavridis said, followed by North Korea and Iran. While he sees Russia and China as most dangerous, the United States should be vigilant with regards to all potential actors, he said.

Stavridis brought up North Korea's response to the 2014 film "The Interview," a satire about an assassination plot against North Korean leader Kim Jong Un.

"They lashed out with a cyberattack against Sony Pictures, an American corporation, did tens of millions of dollars of kinetic damage to Sony as well as a great deal of reputational damage," he said. "So it's not just big nations coming at big nations, it's also small nations going at big nations."

But the big nations could conceivably come to a solution, said Stavridis. He proposed that future administrations create a position titled director of national intelligence and cybersecurity.

"That idea of interagency cooperation is key to protecting us in the cyber realm," he said.

Stavridis, dean of the Fletcher School of Law and Diplomacy at Tufts University, had been rumored as a possible candidate for secretary of State in the Trump administration. He said he was pleased with President-elect Donald Trump's choice for the position, citing Exxon Mobil CEO Rex Tillerson's business relations abroad and noting the importance of cultivating a "more transactional relationship" with Russia.