Rating: Safe

Natural flavoring: vanilla-flavored and other foods
This substance is occasionally used as a natural flavoring. Only about 1,000 pounds of the product are used annually, so it really isn't a significant part of the food supply, nor should it pose any risk. The FDA considers it to be "generally recognized as safe." But because it is extracted from the anal castor sacs of beavers, it has been publicly lampooned in recent years.

Beavers mix castoreum with urine to mark their territories and make their fur and tail more water-resistant. The food industry finds it strong, tar-like, musky odor to be useful in flavorings. Of course, you'll never see "castoreum from anal sacs of beavers" on food labels; instead, it is just included in the broad term "natural flavorings."