The FBI is investigating how WikiLeaks obtained secret documents about the CIA’s cyber-snooping tools — and the White House said Wednesday that President Trump was “extremely concerned” about the stunning security breach.

It also emerged that the CIA learned late last year that its hacking operations had been compromised, but didn’t know the material would be made public until nearly 9,000 pages popped up Tuesday on the WikiLeaks website.

In a statement, the spy agency again refused to address the information’s authenticity, but noted that it is “legally prohibited from conducting electronic surveillance targeting individuals here at home, including our fellow Americans, and CIA does not do so.”

White House press secretary Sean Spicer called what WikiLeaks did “the kind of disclosure that undermines our security, our country and our well-being.”

Spicer also insisted there was a “massive, massive difference” between Tuesday’s document dump and the anti-secrecy group’s release last year of emails hacked from Hillary Clinton’s campaign manager — which prompted then-candidate Trump to proclaim, “I love WikiLeaks!”

Government sources told Reuters that investigators were focusing on CIA contractors as the likely source of the documents that detail the agency’s ability to covertly turn smartphones — and even some TVs — into listening devices, and possibly hack computerized motor vehicles for assassinations.

A spokesman for the House Intelligence Committee said it was seeking confirmation on when the CIA found out it had lost control of the material, noting: “If it’s true that the CIA knew about it since the end of last year . . . we should have been informed.”

In a Twitter post, WikiLeaks claimed the “Year Zero” information it released Tuesday represented “less than 1%” of a massive archive it has code-named “Vault 7.”

WikiLeaks — which claims to have the source code for the CIA’s software — also said it was considering sharing its information with tech companies to help them defeat the hacking methods.

Security sources told the Times of London that hostile states including Russia and terror groups like ISIS and al Qaeda stood to gain the most from the WikiLeaks disclosures — and current and former European officials said Russia may have played a role.

“It’s interesting and maybe significant that this leak coincides with stepped-up Russian attempts to influence upcoming European elections, intimidate the Baltic states . . . and destabilize NATO and the European Union,” one official told Reuters.

Germany said federal prosecutors were looking “very carefully” at the WikiLeaks material, which purportedly shows the CIA has used the US consulate in Frankfurt to launch hacking attacks.

Meanwhile, major electronics manufacturers were scrambling to minimize the fallout.

Samsung, whose smart TVs reportedly can be hijacked and made to look like they’re not turned on, said: “We are aware of the report in question and are urgently looking into the matter.”

Apple said it believed “many of the issues” had already been “patched” in its latest software update.

With Post wire services