Boric acid is commonly used in cosmetics as a buffering agent to control the pH level of a product and to help stabilize its formula. It also acts as an antimicrobial agent, helping to prevent the growth of bacteria and fungi in cosmetic products.