Saul Loeb/AFP/Getty Images

Silicon Valley and the CIA might need some more counseling sessions.

The shaky relationship between the spy agency and the tech industry had been improving, at least until WikiLeaks jumped in, according to former CIA director David Petraeus.

Petraeus, who was briefly considered for the post of President Trump's national security adviser, said WikiLeaks' release of thousands of documents allegedly showing the CIA's hacking tools could be as crushing as Edward Snowden's revelations about the NSA in 2013.

"This will damage the relationship that was being re-established with IT companies in the wake of the Snowden revelations," Petraeus told KPCC on Wednesday. "They did enormous damage to those relationships and there was a rebuilding process that was going on. I'm afraid that this could set that back a bit."

Silicon Valley has been at odds for years with law enforcement and the intelligence community over the balance between privacy and national security. Apple, for instance, went toe-to-toe with the FBI in 2016 after the bureau demanded that the company unlock an iPhone belonging to one of the San Bernardino terrorists..

With its "Vault 7" release on Tuesday, WikiLeaks accused the CIA of exploiting vulnerabilities in software from companies like Apple, Google, Microsoft and Samsung, while keeping those holes secret so it could continue using them to spy on devices. CNET is unable to verify whether the documents are real or unaltered.

Leaving those holes unpatched -- never mind any actual secret snooping -- flies in the face of the security that hardware and software makers strive for in the products it sells. Tech giants like Apple and Google put a high priority finding bugs, offering up to $200,000 to hackers who find and report exploits.

The CIA has not confirmed or denied the documents' authenticity, but said it was doing its job by having "cutting edge" technology.

The strained relationship between Silicon Valley and US spies might have already hit rock bottom.

"I don't think this does anything to make it any worse, because I don't think it can get much worse," said Paul Rosenzweig, founder of cybersecurity company Redbranch Consulting and the former deputy assistant secretary for policy at the US Department of Homeland Security.

WikiLeaks said it would be handing over the exploits to tech companies so they could patch the vulnerabilities, which Apple and Google said they've already done.

Petraeus was the CIA's director from 2011 to 2012. He resigned in a scandal over an extramarital affair, in which he communicated with a lover through draft emails.

Tech Enabled: CNET chronicles tech's role in providing new kinds of accessibility.



CNET Magazine: Check out a sampling of the stories you'll find in CNET's newsstand edition.