If one is aware that alcohol used in the materials mentioned in the question is liquid by nature and an intoxicant then it is treated like wine, so it is prohibited to consume and considered Najis, and it makes other material that comes in contact with it Najis too, whether they are medicine, cosmetics or cleaning material. If it is not know that it is intoxicant or it is not liquid by nature then it is Tahir.
If the cure is limited to the use of medicine that contains Najis things, it is permissible to use it. The usage must not exceed the need.