A recent iCloud hacking spree has resulted in several celebrities' nude photos being exposed, but it could not have come at a worse time for Apple.

According to Re/Code, Apple announced Monday it is "actively investigating" the situation right as the company is preparing to release new software. One of the main upgrades in iOS 8 and OS X Yosemite are improvements to the iCloud.

"We take user privacy very seriously and are actively investigating this report," Natalie Kerris, a spokeswoman for Apple, told Re/Code.

The hacker got to some 20 female celebrities' private photos through their iCloud account, BBC News reported. Among those affected are Jennifer Lawrence, Kate Upton, Rihanna, Kim Kardashian and potentially many more.

The FBI told the Associated Press it was "aware of the allegations" and indicated they had opened an investigation.

Darien Kindlund, director of threat research at FireEye, told Re/Code about Apple's "two-step verification" security measure for anyone with an account. For all the hype Apple raises about new products, the tech giant has not advertised an online safety feature designed to prevent iCloud hacks.

"In general, Apple has been a little late to the game in offering this kind of protection, and doesn't advertise it," Kindlund said. "You have to dig through the support articles to find it."

As it turns out, signing up for the two-step verification is quite simple. All a user must do is click a few links and wait three days, an added precaution to ensure the account's real user is the one activating the two-step verification. At the end of it all, a user will sign in to their Apple account with a password and a four-digit code, adding an extra layer. The two-step verification also axes security questions.

As for the hacker, he or she could be in a lot of trouble, but Kindlund said they benefitted from one glaring error in Apple's security system.

"The attackers never should have been allowed to make an unlimited number of guesses," Kindlund said of the since fixed vulnerability.