Credit card companies MasterCard and Visa are investigating a security breach in the United States that may have put the account details of millions of customers at risk.

MasterCard said it is taking steps to safeguard account information and Visa said customers would not be liable for any fraudulent transactions. The breach reportedly occurred at a third party processing plant.

Reports suggest the numbers from ten million accounts may have been stolen when customers used their credit cards in New York.

The thieves stockpiled stolen credit card numbers for months before beginning to use them, according to Gartner analyst Avivah Litan.

Indications were that the culprits were part of a Central American crime gang, Mr Litan told AFP.

"It sounds like they went into an administrative privilege account at the taxi company and stole electronic data from a central server," he said.

"So, if you've paid a NYC cab in the last few months with your credit or debit card, be sure to check your card statements for possible fraud."

Visa and MasterCard both said they were investigating the breach, which they stressed involved a "third party" and not their internal networks.

"Visa has provided payment card issuers with the affected account numbers so they can take steps to protect consumers through independent fraud monitoring and, if needed, reissuing cards," the company said in a statement.

Visa and MasterCard are alerting banks and credit unions across the US to what some in the financial sector are calling a "massive" breach.