US retailer Target has suffered a massive data breach that exposed the credit card details of up to 40 million customers, the company said on Thursday.

Target said that the stolen data included the names and credit card details of all customers who swiped their cards at stores between November 27 and December 15.

Target did not say how the breach occurred but said that it had fixed the vulnerability and was co-operating with authorities.

There are about 1,800 Target stores in the US and Canada and the reported data breach is one of the largest on record. Data from some 130 million cards was stolen from payment processor Heartland Payment Systems in 2009, while 100 million users accounts were exposed on Sony’s Playstation Network in 2011 and 46 million accounts were compromised by retailer TJX in 2006.