Toiletries have a habit of spilling all over the place while traveling. Sometimes it’s due to the pressure on the airplane, other times a lid that hasn’t been screwed on tight enough can just start leaking all over the place.
When you’re flying or doing a change in elevation you should always be mindful to let the air of the plastic bottles and containers. This will make it less likely that the pressure change will cause them to explode.
It’s not always possible to prevent spilling, but you can prevent the spills from getting all over everything else. One of the best ways to do this is to store everything in plastic baggies.