PUBLISHED October 1, 2013

Beavers are among the largest of the rodents. Photograph by Joel Sartore, National Geographic Photo Ark

Just in time for holiday cookie season, we’ve discovered that the vanilla flavoring in your baked goods and candy could come from the anal excretions of beavers.

Beaver butts secrete a goo called castoreum, which the animals use to mark their territory. The U.S. Food and Drug Administration lists castoreum as a “generally regarded as safe” additive, and manufacturers have been using it extensively in perfumes and foods for at least 80 years, according to a 2007 study in the International Journal of Toxicology.

“I lift up the animal’s tail,” said Joanne Crawford, a wildlife ecologist at Southern Illinois University, “and I’m like, ‘Get down there, and stick your nose near its bum.'”

“People think I’m nuts,” she added. “I tell them, ‘Oh, but it’s beavers; it smells really good.'”

Castoreum is a chemical compound that mostly comes from a beaver’s castor sacs, which are located between the pelvis and the base of the tail. Because of its close proximity to the anal glands, castoreum is often a combination of castor gland secretions, anal gland secretions, and urine.

The fragrant, brown slime is about the consistency of molasses, though not quite as thick, Crawford said.

While most anal secretions stink—due to odor-producing bacteria in the gut—this chemical compound is a product of the beaver’s unique diet of leaves and bark, Crawford added.

Instead of smelling icky, castoreum has a musky, vanilla scent, which is why food scientists like to incorporate it in recipes.

Save a Cow, Milk a Beaver

But getting a beaver to produce castoreum for purposes of food processing is tough. Foodies bent on acquiring some of the sticky stuff have to anesthetize the animal and then “milk” its nether regions. (Read about scientists who milk mice.)

Throwback TV: Backstage at the Beaver Pond Could a beaver win a race against champion Olympic swimmer Michael Phelps? Join a vintage nature film shoot at a beaver pond to find out, and learn other little-known facts about one of the world's biggest rodents.

“You can milk the anal glands so you can extract the fluid,” Crawford said. “You can squirt [castoreum] out. It’s pretty gross.”

Due to such unpleasantness for both parties, castoreum consumption is rather small—only about 292 pounds (132 kilograms) yearly. That statistic includes castoreum, castoreum extract, and castoreum liquid, according to Fenaroli’s Handbook of Flavor Ingredients.

Still concerned you’re chowing down on beaver-bum goop? Because of its FDA label, in some cases, manufacturers don’t have to list castoreum on the ingredient list and may instead refer to it as “natural flavoring.” Yum.