More than one in four new H.I.V. infections in Ukraine occur among the country’s roughly 350,000 injecting drug users. Before the war, Ukraine’s policies on harm reduction enabled more than 17,000 of its citizens to receive so-called opioid substitution therapy.

The demand for treatment has increased as access to street drugs has decreased during the conflict. But now stocks of the opioid substitution drugs methadone and buprenorphine are unlikely to last beyond one to two weeks, experts said.

So the W.H.O. and other nonprofit organizations are requesting drug donations from the Czech Republic, Austria and other countries. The Global Fund, an enormous global health organization, has made more than $3 million available to purchase these treatments over the next year.

Some experts worried that if Russian forces prevailed, Ukraine’s drug users would be in grave jeopardy. Opioid substitution therapy is illegal in Russia. Within 10 days of its annexation of Crimea in 2014, Russia shuttered all of the methadone delivery centers, resulting in deaths from overdoses and suicides.

“You can’t just stop these treatments from one day to the next,” Dr. Kazatchkine said.

Women who use drugs face particular stigma and discrimination from state organizations and medical institutions, said Tetiana Koshova, regional coordinator in Kyiv for the Ukrainian Network of Women Who Use Drugs.

Before the war, the organization helped 50 to 70 women each month, but now that number has doubled, Ms. Koshova said.

Ms. Koshova got her diagnosis of H.I.V. in 2006, at age 27, and said she worried about the availability of H.I.V. drugs as the war grinds on. Although warehouses still hold stocks of antiretroviral medicines, “the situation can change in any moment, because rockets fly anywhere and destroy everything indiscriminately,” she said.