But the risk virtually disappeared, the study found, a year after patients stopped taking the once widely-used painkiller, which was recalled by manufacturer Merck in 2004 after research showed a link with heart disease.
Last year the US-based pharmaceutical giant, while not admitting fault, agreed to pay out 4.85 billion dollars (3.57 billion euros) to head off some 50,000 pending lawsuits.
Other drugs in the same class, known as Cox-2 inhibitors, may also increase the chances of strokes and heart attack, the authors said.
A team of researchers in Britain and the United States followed up on clinical trials conducted in 2000 and 2001 designed to assess whether a three-year treatment with rofecoxib, the generic name for Vioxx, would prevent cancerous colon polyps from reappearing.
The trial was stopped a couple of months shy of the planned completion date when Vioxx was recalled.
The new study, published in the British medical journal The Lancet, tracked 84 percent of the more than 2,500 patients from the trial who had been divided into two groups, one taking daily doses of rofecoxib, and the other dummy pills with no active ingredients.
The researchers looked for any signs of "cardiovascular toxicity" such as non-fatal or fatal heart attacks or strokes occurring during the year after treatment stopped.
In the original clinical trial, patients were monitored for adverse effects only while taking the drug, and 14 days afterward.
The long-term study was consistent with earlier findings that the drug doubled the risk of heart attack or stroke, but that the risk did not appear to augment over time.
"Our data are compatible with an early increase in risk that seems to persist for about one year after three years of treatment," the researchers concluded.
"The cardiovascular toxicity seems to be a class effect. Indeed, studies of other selective COX-2 inhibitors reported similar findings," they added.
So-called COX-2 drugs were designed to be safer replacements for other less-narrowly targeted anti-inflammatory drugs, such as ibuprofen, that suppressed not just the COX-2 enzyme but another one, COX-1, that plays a key role in protecting the stomach from corrosive gastric juices.
Vioxx was generating more than two billion dollars (1.45 billion euros) in sales annually for Merck when it was taken off the market.