In a video address late on Sunday, Mr Zelensky said: “Such an array of crimes against the foundations of the national security of the state… pose very serious questions to the relevant heads [of the two organisations].”
“Each of these questions will receive a proper answer,” the Ukrainian president added.
The sacking of SBU chief Ivan Bakanov, a childhood friend of Mr Zelensky, follows the high-profile arrest of a former SBU regional head in Crimea, annexed by Russia in 2014. Oleh Kulinych is suspected of treason.
“Everyone who together with him was part of a criminal group that worked in the interests of the Russian Federation will also be held accountable,” Mr Zelensky said. “It is about the transfer of secret information to the enemy and other facts of co-operation with the Russian special services.”
Senior intelligence officials based in Kherson have also been charged and Mr Zelensky suggested that further action would be taken against other SBU officers.
It has long been assumed Ukraine had a problem with Russian infiltration of its security services and in his speech Mr Zelensky sought to lay out the impact of repeated security breaches.
It will come as no surprise to many in Ukraine that Moscow tried to infiltrate their security services and prosecutor’s office.
Russia’s FSB has a long history of trying to work from the inside. Indeed, all intelligence agencies do. That is how they work.
What may be more shocking is the extent to which they succeeded, seemingly undermining Ukraine’s defences at a crucial moment. The strategically important city of Kherson fell in days, with bridges that should have been blown up apparently left standing.
The fear is that the insidious actions of a surprisingly large number of Ukrainian officials and officers helped Russia’s offensive and left Ukraine exposed.
It is not being suggested that either Ivan Bakanov or Iryna Venediktova betrayed their country, but that they ran organisations where others did. For that, they have paid with their jobs.
It is also worth remembering that the problem of security service infiltration is not unique to Ukraine.
Indeed, shortly after the start of the war there was reportedly a purge of FSB officers suspected of working for Ukraine or at least being sympathetic to their cause.
There will be no secret service on earth that doesn’t have some issues with foreign agents. But the apparent scale of this will be genuinely concerning to Ukrainians, especially coming at a time when the stakes could not have been higher.
There have been reports for several weeks that Mr Zelensky wanted to replace Mr Bakanov after coming to blame him for failures in stopping the Russian advance in February.
The 47-year-old was picked to head the intelligence agency in 2019 after managing Mr Zelensky’s insurgent campaign for the presidency. Opposition figures criticised the appointment, arguing that the former TV producer was unqualified to lead the SBU.
Ms Venediktova will be succeeded by her deputy, Oleksiy Symonenko, Mr Zelensky said. She took office in 2020 as Ukraine’s first female law enforcement chief after Mr Zelensky fired her predecessor, accusing him of not producing results.
But he warned at the time that someone else would be hired if she could not clamp down on corruption in the country.
Earlier this month she told the BBC that her office was investigating some 21,000 war crimes and crimes of aggression allegedly committed by Russia since the start of its invasion.