The toll of addiction is staggering. Approximately one in seven people who try addictive substances will get hooked, and the abuse of illicit drugs costs the economy $193 billion each year in healthcare, crime prevention, and loss of productivity, according to the National Institute on Drug Abuse. Around 22,000 people each year die after overdosing on illicit drugs.

Those in recovery walk a fine line. Any slip-up could potentially send them back down the path to addiction. But now, there could be a new tool to help addicts fight back. Researchers are working on vaccines that block drugs from reaching the brain, preventing addicts from getting high. These vaccines could help people in recovery stay clean, but they’re not likely to become part of the standard childhood immunizations lineup.

Related: This Revolutionary Gene-Editing Tool Could Change the World

Some drugs already exist to help people get off a substance, but most must be taken daily and can have side effects including joint pain, anxiety, and impotence. Addiction vaccines, on the other hand, could work for months — or even years — though they would require multiple boosters.

The latest efforts in the field focus on prescription opioids like fentanyl, but work on addiction vaccines also includes shots for nicotine, cocaine, heroin, and methamphetamines. Chilean researchers are even working on an addiction vaccine for alcohol. With nearly two decades of research already invested, these efforts may soon pay off for people in recovery.

Researchers are hard at work on addiction vaccines for opioids, nicotine, cocaine, heroin, and methamphetamines. MHRP

Vaccines are like a training course for the immune system — they give the body an opportunity to fight attackers like viruses or bacteria. Or in this case, drugs of abuse.

“The concept of addiction vaccines is if you can prevent the addictive molecule from reaching the brain, you won’t get the high and you’ll stop using,” explains Ron Crystal, a researcher at Weill Cornell Medical College who has developed a vaccine against cocaine that will soon go into clinical trials.

Making the Small Seem Large

Get the mach newsletter. This site is protected by recaptcha

The aim is for the immune system is to develop enough antibodies to attack the drug. Crystal describes the process: “If you snort some cocaine, it takes about 6 to 8 seconds to travel to the receptors in your brain, where it will induce an effect of getting high,” he says. “The antibodies have to be sufficient — like little Pac-Men floating around in your blood — to prevent the drug from reaching the brain.”

Viruses are incredibly tiny — after all, they require a special microscope to be seen. But compared with chemicals from addictive drugs, viruses are huge, which is why human immune systems don’t recognize the drugs as invaders. “That’s the reason why, even with million of smokers in the world who have nicotine floating around in their blood, nobody develops antibodies to it,” Crystal says.

Related: Three Myths About Your Brain (That Deserve to Die)

To get around this problem, Crystal’s vaccine uses bits of viruses, like the cold virus, and a particle that mimics the structure of cocaine. When injected, the vaccine stimulates the immune system to mount a response to the cold virus — and the cocaine structure that's hitching a ride.

In primate studies, only 20 percent of a cocaine dose was able to cross into the brains of immunized animals. The system requires a monthly booster to keep the level of antibodies up — something that would likely be required in people, too.

Heroin Treatment — in a Needle

Among the anti-heroin vaccines being tested, one coaxes the immune system to attack heroin and helps eliminate it from the body so effectively that it can neutralize lethal levels of the drug in animals.

A second anti­-heroin vaccine, developed at the Walter Reed Army Institute of Research in Silver Spring, Maryland, goes after two closely linked problems: It keeps heroin from reaching the brain while also preventing HIV infection.

“The antibodies have to be sufficient — like little Pac-Men floating around in your blood — to prevent the drug from reaching the brain.”

“One of the common things is the threat of HIV due to substance abuse in injection drugs, and sharing needles,” says Gary Matyas, a biochemist who is leading the research at Walter Reed. “One of our goals is to develop vaccines for HIV, even something that partially works against HIV.”

The dual-purpose vaccine uses a protein carrier to create high levels of antibodies that bind to heroin and stop it from reaching the brain. The researchers plan to combine the vaccine with a novel therapy that reduces the risk of HIV. This vaccine protected about one-third of participants against HIV when it was tested in Thailand in 2009 — a modest result, but the first time any vaccine has worked in a human trial.

Merging the HIV vaccine with the heroin vaccine could be a game-changer for the two epidemics, which are intricately linked: Around a quarter of AIDS cases stem from intravenous drug use. Matyas says the combination anti-heroin-HIV vaccine is ready to enter clinical trials.

Related: Tiny Organ Chips Promise Boost to Drug Testing

There are still challenges, though. When a person receives a vaccination against heroin, he or she also will lose the pain relief from morphine, since the two substances are closely linked. “So you lose those drugs as therapy for pain,” says Matyas, who points out there are other painkillers that don’t have the same chemical makeup and would still work.

That might be a small price to pay for getting rid of addiction, though the process involves more than just a vaccine. The researchers say vaccines are just one part of a system of changing behavior — but they could offer an important respite for people who are trying their best to make a change. It’s common for people to relapse, or to require more than one type of treatment, before finding a course of recovery that suits them.

“Basically I view any of these vaccines as a therapy for someone who wants to quit,” Matyas says. “It’s a tool for someone who wants to quit. They give a window where someone would have the opportunity to overcome their addiction.”

Follow NBC MACH on Twitter, Facebook, and Instagram.