Higher food prices arising from restrictions on exports from Russia or Ukraine have been exacerbated by energy price rises, leading to higher costs for agricultural inputs such as fertilizer. Here, using a scenario modelling approach, we quantify the potential outcomes of increasing agricultural input costs and the curtailment of exports from Russia and Ukraine on human health and the environment. We show that, combined, agricultural inputs costs and food export restrictions could increase food costs by 60–100% in 2023 from 2021 levels, potentially leading to undernourishment of 61–107 million people in 2023 and annual additional deaths of 416,000 to 1.01 million people if the associated dietary patterns are maintained. Furthermore, reduced land use intensification arising from higher input costs would lead to agricultural land expansion and associated carbon and biodiversity loss. The impact of agricultural input costs on food prices is larger than that from curtailment of Russian and Ukrainian exports. Restoring food trade from Ukraine and Russia alone is therefore insufficient to avoid food insecurity problem from higher energy and fertilizer prices. We contend that the immediacy of the food export problems associated with the war diverted attention away from the principal causes of current global food insecurity. The Russia–Ukraine war has impacted food access globally, but the exact drivers behind it and the broader consequences for human and environmental health are unclear. Through scenario analysis, this study assesses the relative importance of higher agricultural input prices and export disruption to food access, and estimates undernourishment and cropland expansion.