You can bring medications (liquid, gel, foam) of not more than 3oz on as a carry-on. Since rogaine foam is under 3 oz you can put in in a ziplock bag with other liquids/creams/medications/toothpaste (all less than 3oz quantities) and put it in the tray with your shoes/belt as you go through security. Ive done it before, no problems...