Apple iPhone 5
Apple iPhone 5Reuters

iPhone maker Apple has released a security fix to prevent a flaw in its mobile software that could allow hackers to intercept email and other communications, according to a company statement.

Apple has released software patches and an update for the current version of iOS on devices such as iPhone 4 and later, 5th-generation iPod touch, and iPad 2.

The security hole might have allowed hackers to see or alter communication between the user and protected sites such as Gmail and Facebook, if they were on the same unsecured wifi hotspot as their victim, according to experts cited by Reuters.

Apple said in its release notes that the previous software "failed to validate the authenticity of the connection". However, it did not say when or how it learned about the issue and whether the flaw had been successfully exploited.

Without the fix, a hacker could impersonate a protected site and sit in the middle as email or financial data travelled between the user and the real site, Johns Hopkins University cryptography professor Matthew Green told Reuters.

This was "an embarrassing lapse for a company of Apple's stature and technical prowess," according to the news agency.

Documents leaked by the US National Security Agency whistleblower Edward Snowden revealed that intelligence authorities had 100% success in breaking into the company's iconic iPhones.