Both countries were major exporters of both food and grain, occupying a large percentage worldwide, which now with the conflict has been completely altered. It has also caused a clear rise in energy prices. A deadly combination, especially for third world countries, which see how something as basic as food is no longer within their economic reach.
Another point that can exacerbate the global food crisis is the issue of fertilizers; the two Slavic countries are also large producers.