A popular brand of cookies has been recalled due to a potentially “life-threatening” allergen.