Macy's has been hit by a data breach.

The department-store chain, which also owns Bloomingdale's, warned shoppers that their personal details and, in some cases, credit-card information, could have been accessed by a third party.

The breach took place between April 26 and June 12, according to a letter that Macy's sent to customers who may have been impacted.

The retailer joins a list of several other companies that have been hit by a data breach in the past year.

Macy's is the latest retailer to be hit by a data breach.

The department-store chain, which also owns Bloomingdale's, confirmed that some of its online shoppers could have been victims of a data breach between April 26 and June 12.

In a letter leaked to DataBreaches.net, Macy's wrote to impacted customers that an unauthorized third party had potentially gained access to their personal information and, in some cases, credit card details. The leaked information could include customers' first and last names, addresses, phone numbers, email addresses, and birthdays.

Macy's has not confirmed exactly how many customers were impacted. However, a spokesperson for the company told Business Insider that it was limited to a small group of customers shopping on Macys.com and Bloomingdales.com.

"We have investigated the matter thoroughly, addressed the cause and, as a precaution, have implemented additional security measures. Macy’s, Inc. will provide consumer protection services at no cost to those customers. We have contacted potentially impacted customers with more information about these services," Macy's said in a statement to the press.

The company joins a long list of retailers — including Sears, Kmart, Whole Foods, and Under Armour — that have been impacted by a data breach in the past year. The majority of the retailers that experienced a breach have not confirmed exactly how many customers were impacted.

Breaches can have huge repercussions, often resulting in customers losing trust in the brands. According to a study from KPMG, 19% percent of consumers said they would stop shopping at a breached retailer, and 33% would take a long-term break.

This is bad news for Macy's, which is doubling down on its digital platform in its ongoing effort to compete against online players.