Retail giant Home Depot confirmed on Thursday that around 56 million payment cards of customers have been affected by the recent attack on the company's network, according to Fox News.

The cyber attack, which was revealed by the company earlier this month, involved a malware that collected information from customers who used banking cards for their transactions.

Customers who used credit and debit cards for their purchases in Home Depot stores were immediately exposed to the malware.

According to the company, the attack persisted from April of this year until the beginning of September and affected all stores in the U.S. and Canada.

"Criminals used unique, custom-built malware to evade detection," Home Depot said in a statement. "The malware had not been seen previously in other attacks according to Home Depot' security partners."

"The cyber attack is estimated to have put payment card information at risk for approximately 56 million unique payment cards," the company added.

Immediately after detecting the malware, Home Depot stated that it coordinated with its banking partners as well as law enforcement agencies to investigate the matter, Reuters reported.

As part of its security methods, the company deactivated all infected payment card terminals in its stores.

"To protect customer data until the malware was eliminated, any terminals identified with malware were taken out of service, and the company quickly put in place other security enhancements," Home Depot stated.

"The hackers' method of entry has been closed off, the malware has been eliminated from the company's systems, and the company has rolled out enhanced encryption of payment data to all U.S. stores," the company added.

The company confirmed that the investigation process did not uncover any evidence regarding payment card PIN numbers being compromised.

Home Depot added that customers who shopped through its online stores, HomeDepot.com and HomeDepot.ca, are unaffected by the security breach, according to Business Insider.

"We apologize to our customers for the inconvenience and anxiety this has caused, and want to reassure them that they will not be3 liable for fraudulent charges," Home Depot CEO Frank Blake said.

"From the time this investigation began, our guiding principle has been to put our customers first, and we will continue to do so," he added.