Things which go into the body from the pores of the skin don’t break the fast.
Thus, water that you wash yourself and a kind of moisturiser or oil applied to body doesn’t affect the fast and doesn’t break the fast. For example; eyeliner doesn’t break the fast. But if one sees the colour and the trace of it in the spit then it changes the condition and breaks the fast. But if you don’t see the trace or the colour of it in the spit, it doesn’t break the fast.
A medication, applied on an open wound and moisturized thus absorbed through the skin inside of the head or absorbed but doesn’t reach into the head and stays under the skin, doesn’t break the fast. But a medication applied on an open wound like this and which is doubtful whether it reaches inside of the head. This kind of a doubtful application, according to Imam-i Azam, breaks the fast. Because this kind of a medication penetrates inside of the body.
According to Imamayn this doesn’t break the fast.