Painkillers can be both a blessing and a curse. They’re effective at numbing everything from the inflammation that comes with infection to headaches and the achy joints of arthritis. But recent studies have exposed some serious side effects, including increased risk of heart events. The newest class of these drugs, COX-2 inhibitors, seemed especially risky for the heart, leading to the withdrawal from the market of one medication and a Food and Drug Administration warning on others.

In a new study published in the BMJ, researchers detail the risks associated with other prescription painkillers known as non-steroidal anti inflammatory drugs (NSAIDs). COX-2 inhibitors belong to the NSAID class, but were supposed to be more targeted to reducing pain while avoiding some of the intestinal bleeding risk associated with NSAIDs—until their heart problems were revealed. So Giovanni Corrao, from the University of Milano-Bicocca, and his team studied data from 10 million users of NSAIDs from the Netherlands, Italy, Germany and the UK to better understand if NSAIDs, too, carried any increased risk to the heart.

The people in the studied used 27 different types of NSAIDs, including four selective COX-2 inhibitors. When they compared NSAID use with rates of heart problems, they found that people currently using one of the painkillers had a 19% higher risk of being hospitalized for heart failure compared to those who had used the drugs in the past. The higher the dose of the NSAIDs, the higher risk of heart trouble. And seven medications in particular seemed to be linked to more heart problems: ibuprofen, naproxen, diclofenac, indomethacin, ketorolac, nimesulide and piroxicam. Two COX-2 inhibitors, etoricoxib and rofecoxib, were also linked to higher risk.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

While the risk of heart failure was known, the latest findings establish that even NSAIDs that aren’t COX-2 inhibitors, which work in a different way to relieve pain, carry some risk. Since they change the way the kidneys work and alter salt metabolism, they can contribute to heart failure in people who might be susceptible to heart problems. But the study found that even people without any history of heart trouble also increased their risk of events if they took NSAIDs.

The results also showed that the COX-2 inhibitors, which have caused the most concern when it came to the heart, were linked to about the same rate of heart-related hospitalizations as the other NSAIDs.

Because the study looked at correlations between NSAID use and heart issues, the findings don’t imply that the prescription painkillers cause heart failure. But they suggest that doctors prescribing the drugs should discuss the potential risk with their patients and be more aware of heart-related risk factors that might make the drugs more risky for some.

Contact us at letters@time.com.