Around 120 cases have been identified worldwide. Infections can take as long as five years to show up.
READ MORE
• Twin Levi Maaka facing ongoing battle of the heart
• Broadcaster Eric Young's birthday gift: Open heart surgery
• Operating theatres too hot for surgeons
The machines' manufacturer highlighted the issue, and DHBs and other providers cleaned the units and continued monitoring, believing this would prevent the issue, a ministry spokesman said.
"When the bacteria was detected again in 2017, the manufacturer provided updated advice, which includes retro-fitting the devices with gaskets and vacuum seals to minimise risk. DHBs have taken appropriate actions to ensure the safety of the machines, based on advice from the manufacturer, and are continuing to rigorously monitor them."
Some 1200 of the letters were sent to the families of children who had had open-heart surgery in New Zealand. The letter says there is a 1 in 5000 chance of infection.
"The bacteria rarely cause infections in healthy people, but people with weakened immune systems (including some cardiac patients) are more susceptible to becoming ill through exposure to these bacteria. There is no risk to your family or friends, or to the general public," the letter reads.
Heart Kids NZ said in a statement it was "extremely disappointed" it had taken so long for the Ministry of Health to release information.
Chief executive Rob Lutter said the ministry had known of the threat since 2015 but had waited until a patient was infected before informing all patients there was a problem.
"While we understand there is only a very small chance of infection, about 1 in 5000, it's unacceptable that patients were not informed of this risk earlier. We're also very disappointed that it took the infection of a patient for the MOH to act," Lutter said.
Lutter said the risk of being infected was very low but the Ministry could have handled the situation better.
"We would like to know why the Ministry withheld this information for more than two years. We believe the MOH still does not inform patients pre-surgery of the infection risk, and we think this practice should change immediately.
"The Ministry has a duty of care to inform all patients of risks and considering this machine is still in use, then this must be spelt out," he said.
The Ministry of Health has been asked for comment.