Praise be to Allah.
All kinds of preparations that are put on the outside of the body, whether they are absorbed through the skin or not, and whether they are for treatment, moisturizing, beautification or any other purpose, do not break the fast unless they are swallowed by the fasting person.
The mere fact that it has a taste does not affect the fast so long as one does not swallow anything.
Shaykh Ibn Baz (may Allah have mercy on him) was asked in Majmu’ al-Fatawa (15/260):
What is the ruling on women using kohl and some cosmetics during the day in Ramadan? Do these things break the fast or not?
“Kohl does not break the fast of men or women according to the more correct of the two scholarly opinions, but it is better to use it at night if one is fasting.
The same applies to soaps, creams etc that are used to beautify the face and are applied to the surface of the skin, including henna, makeup and the like . There is nothing wrong with using them for one who is fasting, but makeup should not be used if it will cause harm to the face. And Allah is the source of strength.”
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) was asked about the ruling on a fasting person using ointment to treat dryness of the lips.
“There is nothing wrong with a person using ointment to moisturise the lips or nose, or moistening them with water, or with a cloth and the like, but he should avoid anything that could reach the throat. But if anything reaches the throat without him intending it to, there is no sin on him, just as if he rinses his mouth and some water reaches his throat by accident, his fast is not invalidated by that.” (Majmu’ al-Fatawa, 19/224)
Shaykh Ibn Jibrin (may Allah preserve him) said in Fatawa ‘Ulama Balad al-Haram (201):
“There is nothing wrong with applying creams to the body while fasting if there is a need for that, because the cream only reaches the surface of the skin and does not enter the body. Even if it is absorbed by the pores it is not regarded as breaking the fast.”
And Allah knows best.