The malware was on the servers since March 23, operating through April 8 on one and through April 24 on the other, the company said in a statement. It has since been removed.
The malware was designed to collect so-called track 2 data contained on the magnetic stripe of payment cards, which Fred's said contained the card number, expiration date and verification code. No other customer information is at risk.
"During this time period, track 2 data was at risk of disclosure; however, the third-party cyber-security firm did not find evidence that track 2 data was removed from the company's system," the retailer said. Law enforcement is also investigating.
Fred's runs 650 discount stores, mostly in the southeastern part of the U.S. It is just one of many retailers that have recently battled with cybercriminals who have infiltrated payment systems with malware that steals payment card details.
Victims have included Target, Neiman Marcus, White Lodging, Michaels and The UPS Store. In many instances, attackers targeted point-of-sale systems with RAM-scraping malware, which collects unencrypted payment card details while they're briefly held in a computer's memory.
Fred's said it "has implemented and is continuing to implement enhanced security measures to prevent similar events from occurring in the future."
The company said it could not estimate how much the suspected breach would cost, although it did say it has cybersecurity risk insurance, which may cover some breach-related expenses.
Send news tips and comments to jeremy_kirk@idg.com. Follow me on Twitter: @jeremy_kirk