Ukraine's Air Alert app was hacked late on Sunday, with users receiving fake warnings on their smartphones, including alerts about alleged nuclear attacks.
A few hours later, the app of Russia's civil defence agency was also hacked and sent out false alerts.
"We only respond on their attacks," Ukrainian President Volodymyr Zelenskiy told US broadcaster PBS on Monday.
"They attacked our system. It was a cyberattack," he said, adding that Ukraine had defended itself.
The warning apps used by both sides in the war alert residents to potential airstrikes, among other threats.
Russia repeatedly carries out cyberattacks on targets intended to harm civilians, including Ukrainian banks and the pension system, Zelenskiy said.
Zelenskiy was talking after 26 people died when Russia bombed a school that was being used to distribute humanitarian aid in Ukraine's southeastern Zaporizhzhia region.
"The Russians struck first just as people were arriving - a few aerial bombs," he said in his nightly video post.
"Then there was a second strike - more air bombs, this time on the shelter. A vile terrorist strike."
Zelenskiy said the Russians would have been aware that residents remaining in Komyshuvakha gathered every Monday to pick up humanitarian packages.
The attack, he said, showed Moscow was intent on killing people instead of building on the past week's humanitarian mission in the embattled southern city of Oleshky.
"If Russia genuinely wanted de-escalation, there was an opportunity following the situation in Oleshky to continue taking humanitarian steps. We proposed this. But Russia continues to kill people."
The attack happened before US envoy Steve Witkoff announced he would meet on Tuesday and Wednesday with delegations from Ukraine and Russia in Abu Dhabi.
The talks would "discuss security guarantees for Ukraine, Europe's post-war security architecture, and economic opportunities to support Ukraine's reconstruction".
US negotiators will meet later this week in Brussels with representatives from France, Germany, the United Kingdom, the European Union and NATO.