A recently patched bug found in the chips used to provide wifi in iPhones, Samsung Galaxies and Google Nexus devices could be used to build malware which jumps unstoppably from device to device, according to Nitay Artenstein, the researcher who discovered the flaw.

Affected users should update their phones’ operating systems immediately, to iOS 10.3.3 (released 20 July) or the July security update for Android, which contain fixes for the flaw.

Dubbed Broadpwn, the vulnerability was revealed in detail for the first time on Thursday at the Black Hat information security conference in Las Vegas. It works by taking advantage of a number of specific flaws in wifi chips made by the component company Broadcom, ultimately allowing an attacker to write programs directly on to the chip, seizing control of it.

The vulnerability was particularly special, interesting and powerful, Artenstein said, because of its rare status as a truly remote exploit. That means the victim doesn’t have to do anything to be infected, the attacker doesn’t need to know anything about the device they’re targeting, and the system being targeted can be taken over without crashing.

On stage at the conference, Artenstein, who works for the infosec firm Exodus Intelligence, demonstrated a proof-of-concept for what an attacker could do with the bug: infecting a Samsung Galaxy with his custom “worm” (the name for a self-replicating piece of malware), and then watching as the Galaxy phone proceeded to infect another Samsung phone – no intervention required.

“When I started working in this field, we had worms,” said Atenstein, “self-propagating malware which could be run across the network. There were quite a few in the good old days. They died out, together with remote exploits: worms pretty much need them to propagate.

“But Broadpwn is a perfect bug for this kind of thing. A pretty good location to make the first wifi worm and the first network worm in a few years.”

A well-executed wifi worm would spread almost like a real virus, requiring two vulnerable devices to simply be near each other to jump from one to another. But even before the vulnerability was fixed in software updates from Apple and Google, the Broadpwn bug still had limitations: chiefly, it couldn’t make the leap from the wifi chip’s firmware to the actual device.

A second vulnerability would be needed for it to do damage beyond breaking the wifi of affected users. And with the proof-of-concept that already exists, being infected is more embarrassing that anything else: your phone constantly shouts “I’m pwned” into the ether, for anyone listening with the right tools to pick up on.