Apple has included in its latest beta of iOS 7 a fix to a security issue that was discovered last month – which allows hackers to infect your iPhone with a computer virus when it is plugged into a fake charger.

A team at the Georgia Institute of Technology demonstrated the security flaw at the Black Hat hacking convention in Las Vegas on Wednesday, Reuters reports. The researchers built a custom-made charger equipped with a tiny Linux PC programmed to attack iOS devices, and plugged in an iPhone — which then got infected with a computer virus designed to dial the phone of one of the researchers.

Apple’s iOS 7 software update will include a prompt to alert users that they are connecting to a computer and not an ordinary charger. Ars Technica has a screenshot of what this would look like, and it can be seen here:

ios 7 message Apple will include in iOS 7 a fix to a security flaw that allows fake chargers to hack your iPhone

Apple spokesman Tom Neumayr told Reuters: “We would like to thank the researchers for their valuable input.”

In the meantime though, before the iOS 7 update is rolled out officially this fall, Apple devices are vulnerable to such attacks from fake chargers.

The researchers noted that the security flaw could give cyber criminals the leeway to build viruses aimed at getting remote control of iPhones, which could result in access to emails, text messages, contact information and even screenshots to steal bank passwords and credit card numbers. It could even become a spying tool, one of the researchers noted.

Image Credit: David Paul Morris via AFP/Getty Images