State Medicaid programs across the United States may be putting up illegal barriers to prevent low-income people from getting access to expensive new hepatitis C virus (HCV) treatments, suggests a new study published in Annals of Internal Medicine. According to experts, state cost-saving restrictions on new hep C drugs are extensive and vary widely from state to state, and are effectively preventing thousands from finding a cure, Reuters reports.

For the study, researchers at the Center for Health Law and Policy at Harvard Law School went through the Medicaid websites of each state and the District of Columbia in 2014. They found that 42 states have put some sort of restriction on Sovaldi (sofosbuvir) since it came out in 2013, which costs nearly $84,000 for a standard 12-week course of treatment.

The study shows that about three-quarters of Medicaid programs across the country allow the breakthrough HCV treatment to be used only by patients who already have extensive liver damage, classified as either fibrosis or cirrhosis. The drug can only be prescribed by a specialist, not a general practitioner, in about a third of states.

The majority of states have also placed restrictions of patients with drug and alcohol addictions, many requiring abstinence and drug screening before paying for hep C treatment. About a quarter of states also restrict treatment based on HIV status.

These restrictions concern researchers, since many of the limitations do not line up with recommendations of expert medical organizations like the Infectious Diseases Society of America and the American Association for the Study of Liver Disease.

What’s more, experts concluded that several restrictions may actually be violating federal law, which requires Medicaid programs to pay for all drugs approved by the U.S. Food and Drug Administration, as long as the manufacturer has a rebate agreement with the Department of Health and Human Services (HHS).

Gilead Sciences, which makes Sovaldi, has such an agreement with HHS. According to researchers, the widespread restrictions on hep C treatment will have significant public health implications and costs down the line if left unchecked.