The worm changes the wallpaper of the phone
The first worm to infect the Apple iPhone has been discovered spreading "in the wild" in Australia.
The self-propagating program changes the phone's wallpaper to a picture of 80s singer Rick Astley with the message "ikee is never going to give you up".
The worm, known as ikee, only affects "jail-broken" phones, where a user has removed Apple's protection mechanisms to allow the phone to run any software.
Experts say the worm is not harmful but more malicious variants could follow.
"The creator of the worm has released full source code of the four existing variants of this worm," wrote Mikko Hypponen of security firm F-secure.
"This means that there will quickly be more variants, and they might have nastier payload than just changing your wallpaper."
The picture of Rick Astley is believed to be a nod to the internet phenomenon known as Rickrolling, where web users are tricked into clicking on what they believe is a relevant link, only to find that it actually takes the user to a video of the pop star's song "Never gonna give you up".
The worm has so far only been found circulating in Australia, where the hacker - Ashley Towns - who wrote the program lives.
The 21-year-old told Australia's ABC News Online that he created the virus to raise the issue of security.
It only exploits jail-broken phones that have SSH installed, a program that enables other devices to connect to the phone and modify the system and files.
The worm is able to infect phones if their owners have not changed the default password after installing SSH.
"What's clear is that if you have jail-broken your iPhone or iPod Touch, and installed SSH, then you must always change your root user password to something different than the default, 'alpine'," wrote Graham Cluley of security firm Sophos.
"In fact, it would be a good idea if you didn't use a dictionary word at all."
After a phone becomes infected it disables the SSH service, preventing reinfection.
The code contains numerous comments from Mr Towns about his motivation.
Jail breaking allows a user to run non-Apple approved software
One comment reads: "People are stupid and this is to prove it."
"It's not that hard guys. But hey who cares its only your bank details at stake."
The worm can be removed by changing the phone's password and deleting some files.
A spokesperson for Apple warned against jail-breaking handsets.
"These hacks not only violate the warranty, they will also cause the iPhone to become unstable and not work reliably," the spokesperson said.
Some estimates suggest that up to 10% of all iPhones and iPod Touches are jail-broken.
The practice allows a phone user to install software and applications that have not been approved by Apple.
"Phone users may rush into jail-breaking their iPhones in order to add functionality that Apple may have denied to them, but if they do so carelessly they may also risk their iPhone becoming the target of a hacker," said Mr Cluley.
"My prediction is that we may see more attacks like this in the future."