Nobody has to score Hershey’s kisses on the street. Nobody has to smuggle Pringles across the country hidden in the wheel well of a car. And if you’re paying $100 for a gram of Coke, you’re definitely being overcharged.

But that doesn’t mean that the life-sustaining substances we come into the world loving and couldn’t survive without—the sugars and salts and fats and proteins, the fruits and vegetables and breads and meats—can’t get us into every bit as much danger as the deadly, often illegal substances that cause so much suffering. You can eat compulsively, just as you can smoke or drink or do drugs compulsively. And in all those cases, compulsions can become full-blown addictions, as repeated exposure plays the pleasure centers in the brain, creating a feedback loop of craving, indulging, consuming, regretting—and doing it all over the next day and the next.

Some numbers suggest that food may be as addictive as drugs, and in some cases more so. About 30% of people who try heroin become addicts; the same goes for about 16% of cocaine users. One study published in Frontiers in Psychology found that, when the definition of addiction is explained to obese or overweight subjects, up to 29% of them describe themselves as addicted to food. That takes its toll: more than 40% of Americans who are obese and the overall 71.6% who are overweight—which suggests at the very least an unhealthy dependency on food is common in the U.S.

This article is excerpted from TIME: The Science of Addiction—What We Know. What We’re Learning.

In some ways, of course, food is more insidious than drugs, because there’s no such thing as abstinence, no such thing as never starting in the first place, no such thing as being able to say, “Food? Never touch the stuff.” You eat because you’ll die if you don’t, so you spend your life in a sort of nutritional two-step—a little but not too much; go overboard today, cut back tomorrow; eat the good stuff but never the junk. Sometimes you succeed at all of that, and other times you fail terribly; we all do. The more we learn about how the brain and palate and metabolism process food, the more we’re realizing that a lot of this is not our fault.

“In all my years as a physician, I have never ever met a person who chose to be an addict, nor have I ever met someone who chose to be obese,” said Nora Volkow, the director of the National Institute on Drug Abuse, in her celebrated 2015 TedMed talk. “So, imagine what it must be like to be unable to stop doing something when you want to.” That inability is at the heart of addiction—and when it comes to food, we’re all at risk.

Pleasure gets processed in many parts of the brain, but if you’re looking for the spot where good feelings can turn into bad outcomes, you’ll find it in the striatum. Buried deep in the midbrain, the striatum is rich in what are known as D2 receptors, whose job it is to bind with the feel-good neurotransmitter dopamine. Dopamine drives the reward system—the sensation of satisfaction you get from an obstacle overcome or a job well done. Dopamine also helps you experience more-primal pleasures: food, sex, intoxication.

As long as the dopamine system remains in balance in the striatum, so too will our ability to control those pleasures—a single slice of cake; wine with dinner but no more after that. When the system starts to flicker, however, with too few D2 receptors and too little dopamine being released to engage with them, our behavior is affected dramatically. Most notably, we give way to impulsivity, grabbing what we want when we want it, with little regard to the downstream consequences.

In a 2014 study published in Neuropharmacology, a pair of psychiatric researchers studied PET scans of the brains of both healthy subjects and heroin addicts and found that a fall-off in striatal function indeed could be detected in the subjects hooked on the drug. The researchers cited additional studies showing similar brain deficits in people addicted to other substances and behaviors. Significantly, in the case of those addictions, the pleasure is processed in a variety of brain regions, but the inability to resist temptation is consistently linked to the striatum.

When it comes to food addictions, dopamine is not the only chemical in play. Also implicated is the hormone leptin, which is released by fat cells and is responsible for feelings of satiety. When you’re hungry and dive into a meal, your leptin levels are low. When you’ve eaten your fill, it’s leptin that tells you to push away from the table. Ideally, that’s something to which you don’t give much thought; you just know you feel satisfied and stop eating. For people who eat compulsively, either leptin is not released in sufficient quantities or it is, but the brain doesn’t react to it adequately. “In animal models, we know that leptin modifies the rewarding effects of alcohol and possibly cocaine,” said Volkow in her TedMed talk. “In obesity, there is leptin tolerance.” In this case tolerance is not a good thing—it means the brain shrugs off the hormone.

The particular foods that make up our menu can play a role in addictive eating too. Nutritionists often lament America’s ostensible sugar addiction as a leading cause of the obesity epidemic, but it’s more complex than that. We may find candy and doughnuts and other sweet foods irresistible, eating them even when we know we shouldn’t. “But that wouldn’t happen if you walked into an office and there was a bowl of white sugar on a table,” says Rachele Pojednic, an assistant professor of nutrition at Simmons University. Instead, the sweets we eat compulsively are products of a trifecta of irresistibles: sugar, fat and salt. Individually they’re entirely unappetizing; together they make magic, turbocharging the so-called hedonic eating system—or the business of eating just for pleasure.

This doesn’t only happen in humans. In a 2013 study led by neuroscientist Joseph Schroeder at Connecticut College, researchers found that Oreos—an indulgent staple of the human diet if ever there was one—lit up the neurons in the pleasure center of rats’ brains even more powerfully than cocaine. And, like humans, the rats knew where to find the sweetest, fattiest, tastiest part of the cookie. “They would break it open and eat the middle first,” said Jamie Honohun, a student who assisted in the research, in a release that accompanied the study. In another statement released at that time, Schroeder and his team wrote, “These findings suggest that high fat/high sugar foods and drugs of abuse trigger brain addictive processes to the same degree.”

What happens to the same degree can lead to the same (or at least similar) consequences—in this case dependency, and too often misery. There’s profound joy to be found in food, and unlike the destructive pleasure often found in drugs, it’s a joy that can be experienced in moderation. Very much like the destructive pleasure of drugs, however, it’s something that can easily spin out of control. Compulsive eaters—sometimes dismissed as lacking willpower or discipline—can have every bit the battle on their hands that drug addicts do. And they deserve every bit of the support as they work to recover.

—Jamie Ducharme, Mandy Oaklander and Maia Szalavitz contributed to this story

Write to Jeffrey Kluger at jeffrey.kluger@time.com.