Guide
Can Malware Spread Through Wi-Fi? How It Really Happens and How to Stop It
Yes, but rarely through the Wi-Fi signal itself. Malware spreads over the network that Wi-Fi connects you to.
Being on the same Wi-Fi as an infected laptop doesn’t infect your phone. What happens in real cases is narrower. A worm on one computer looks for other devices on the network with an unpatched service or an open shared folder. A hacked router redirects or abuses your traffic. A fake hotspot talks you into installing something.
Attacks that really do come through the air, via a bug in a phone’s or laptop’s Wi-Fi chip, exist too. They are rare, and updates fixed the known ones. Below are the real routes, what ransomware can and can’t do on a shared network, how to tell whether your router has been hit, and what protects you.
We rewrote this page in November 2026; the old version was from 2024. The cases and advisories it cites were checked on 15 November 2026.
What Wi-Fi can and can't do
Wi-Fi is just the cable you can’t see. It carries data between your devices and the router, and the router passes it on to the internet. Malware doesn’t hide in the radio waves and wait for you. To get onto a device it needs a way in: a program you run, a service that answers from the network, or a bug in the software that handles the connection.
A shared network matters because it puts your devices within reach of each other. Your laptop can see the printer, the TV and your partner’s PC, and an infected one can see them too. Whether it can do anything with that depends on what those devices accept from the network.
The last row is by far the most common. The Wi-Fi is only the road there, and the same file would infect you on mobile data or a cable.
Can ransomware spread over Wi-Fi?
It can spread over a network, and Wi-Fi is part of most networks. The famous case is WannaCry. On 12 May 2017 it hit more than 200,000 computers in about 150 countries within a day, without anyone clicking anything. It used EternalBlue, a flaw in the old SMBv1 file-sharing protocol that Microsoft had patched two months earlier, and scanned the local network and the internet for the next victim.
That route is mostly closed on home PCs. Windows 10 hasn’t installed SMBv1 by default since version 1709, and a clean Windows 11 has neither the server nor the client (Microsoft).
At home, the realistic danger is different. Ransomware on one computer encrypts whatever that computer can write to: a mapped network drive, a shared folder on a NAS, a cloud folder that syncs. You don’t need a worm for that, only one infected PC with access. Keep at least one backup that the PC can’t overwrite, such as a drive you unplug or cloud storage with version history.
Inside companies, ransomware gangs move from machine to machine with stolen passwords and remote-admin tools rather than through Wi-Fi as such. That is covered in how ransomware spreads on a network.
Can your Wi-Fi router get a virus?
Yes, and it happens far more often than malware hopping between phones. Routers sit on the internet all day, many never get a firmware update, and the owner rarely looks at their settings.
- TheMoon: the FBI warned in May 2025 that criminals were taking over end-of-life routers with remote administration switched on and renting them out as proxies. TheMoon needs no password; it scans for open ports and sends a command to a vulnerable script. The FBI’s rule of thumb: routers from 2010 or earlier probably get no updates anymore.
- ASUS backdoor: in May 2025 GreyNoise reported about 9,000 ASUS routers with an SSH backdoor stored in the router’s settings memory. It survived reboots and firmware updates; only a factory reset removed it.
- VPNFilter: in 2018 Cisco Talos counted at least 500,000 infected routers and NAS drives in 54 countries, and the FBI asked owners to reboot them. A reboot cleared the spying part of the malware, not the part that let it come back.
A hacked router usually doesn’t infect your laptop. It uses your connection for someone else’s traffic, or changes your DNS settings so that some site names lead to fake pages. That second one is the dangerous part for you, because a fake bank page asks for a real password.
Signs worth checking in the router’s admin page: DNS servers you didn’t set, remote management turned on although you never enabled it, admin accounts or SSH keys you don’t know, and firmware the manufacturer no longer updates.
If Avast says your router is infected
Many people only look at their router because an antivirus told them to. Avast’s Network Inspector shows “DNS hijack found” (Avast’s older apps said “Your router is infected”) when it thinks someone has changed the DNS settings in your router. Avast’s support article treats it as a break-in and asks you to set the router’s DNS back to automatic, or to servers you trust, then scan again.
The alert is also wrong fairly often. On Avast’s own forum, users saw it vanish the moment they quit their VPN app (Private Internet Access in one thread), and NordVPN’s old ad blocker set it off until Avast added an exception. Others got it on a brand-new router and lost it after switching off dynamic DNS.
So check before you reset anything. Close any VPN or DNS filter on the computer and scan again. If the alert stays, open the router’s admin page and look at the DNS servers. Your provider’s own servers, or well-known ones such as Google’s 8.8.8.8 or Cloudflare’s 1.1.1.1, are fine. Addresses you can’t place are not, and then the router should get the full treatment below. If the alert survives a reset of the router’s DNS settings, Avast says to contact your provider, whose own DNS servers may have been hijacked.
A “router is vulnerable” alert means something else. Avast found a known security flaw in the router’s software, not an infection, so the fix is a firmware update, or a new router if the maker has stopped shipping them. A weak admin password gets its own alert, and a new password ends it.
If you suspect the router, a restart isn’t enough. Do a factory reset, install the latest firmware, set a new admin password and Wi-Fi password, and switch off remote management. If no firmware has come out for years, replace the router.
Is public Wi-Fi a malware risk?
Less than its reputation. The FTC now says that because most websites encrypt their traffic, using public Wi-Fi is usually safe. Someone on the same café network can see which sites you connect to, not what you type into them.
The malware risk on hotel and airport Wi-Fi comes from what the network asks you to do. In the Darkhotel campaign, which Kaspersky exposed in 2014 after at least four years, guests at luxury hotels logged in with their room number and surname and were then offered a fake update for Adobe Flash, Google Toolbar or Windows Messenger. Installing it gave the attackers a backdoor. It targeted selected executives, not every guest, but the trick works on anyone.
So the rules are short. A Wi-Fi login page never needs you to install anything; close it if it asks. Update apps from the app store or the system settings, not from a pop-up. When Windows asks, mark networks you don’t control as Public, which turns off file sharing and network discovery. And turn off auto-join for networks you don’t use, so your phone doesn’t connect to a look-alike name.
A VPN encrypts your traffic on a hotspot and stops the network from tampering with your DNS, which helps against the fake-site trick. It doesn’t scan what you download, and it can’t stop a bug in your Wi-Fi driver, because that bug sits below the VPN. More on that in does a VPN protect you from viruses.
Signs that a device on your network is infected, and what to do
One infected device doesn’t announce itself to the others, so watch each one. Typical signs:
- your security software reports a detection or has been switched off without you doing it
- a device you don’t recognise in the router’s list of connected clients
- data use or upload traffic far above normal
- new browser extensions, a changed homepage or search engine, ads in places they never were
- friends receiving messages or emails from you that you didn’t send
If one of them fits:
- Disconnect that device from the Wi-Fi so it can’t reach the others or send out more data.
- Run a full scan with up-to-date security software; on Windows, Microsoft Defender’s offline scan restarts the PC and scans before Windows loads.
- Change your important passwords from a different, clean device, starting with email and banking, and turn on two-factor sign-in.
- Check the router as described above, then scan the other computers on the network.
- If the infection comes back or the scan can’t remove it, restore from a backup made before the infection or reinstall the system.
Phones are a special case. For iPhones, see can an iPhone get a virus from a website for what can really happen there.
How to protect your home network
- Update everything, the router included. WannaCry, Broadpwn and the 2024 Windows Wi-Fi bug were all patched before or soon after they became public. Turn on automatic updates on the router if it offers them.
- Use WPA3, or WPA2 with AES, and a long Wi-Fi password. Emotet’s Wi-Fi module got into neighbouring networks by guessing weak passwords. A passphrase of four or five random words defeats that.
- Change the router’s admin password. Since 29 April 2024, routers sold in the UK may no longer ship with a universal default password (PSTI rules), but older routers and many sold elsewhere still do.
- Switch off remote management unless you really administer the router from outside your home. TheMoon and the ASUS backdoor both came in that way.
- Put smart-home devices and visitors on the guest network. Cameras, plugs and TVs rarely get updates, and the guest network keeps them away from your computers.
- Share only what you need. Turn off file sharing on PCs that don’t serve files, and give network drives read-only access where you can.
- Keep one backup out of reach. An unplugged drive or versioned cloud storage is what saves you if ransomware does get in.
- Replace the router when updates stop. The manufacturer’s support page or the router’s update screen tells you when it has reached end of life.
Frequently Asked Questions
Some people found answers to these questions helpful
Can my phone infect my computer over Wi-Fi?
Not by being on the same network. It would need to send the computer a malicious file you then open, or find a vulnerable service on the computer, which an up-to-date PC with file sharing off doesn't offer. Phone malware is also written for the phone's system and rarely runs on a PC at all.
If one device has a virus, does everyone on the Wi-Fi get it?
No. Most malware stays on the device it infected. Only worm-like malware tries to spread, and it needs something to exploit on the other devices: an old unpatched service, a shared folder with write access or a guessable password. Updated devices with sharing turned off give it nothing to work with.
Can someone hack my phone through Wi-Fi?
Through the radio itself only with a bug in the phone's Wi-Fi chip or driver, like Broadpwn in 2017, which affected Broadcom chips in many iPhones and Android phones and was fixed in July 2017 updates. Such flaws are rare and valuable. The everyday risk on Wi-Fi is a fake hotspot or login page that phishes your passwords, which works only if you type them in.
Does restarting the router remove malware?
Sometimes partly. A restart cleared the spying stage of VPNFilter in 2018, but the ASUS backdoor of 2025 survived restarts and firmware updates. If you suspect an infection, do a factory reset and then install the latest firmware.
Are smart home devices at risk on my Wi-Fi?
They are the weakest part of most home networks, because many never get updates. When researcher Mathy Vanhoef published the FragAttacks flaws in 2021, every Wi-Fi product he tested had at least one of them, and he named attacks on poorly updated devices in a home network as the biggest real risk. A guest network for those devices limits the damage.
Does a VPN stop malware on Wi-Fi?
Not really. A VPN encrypts traffic between your device and the VPN server, which protects you from snooping and DNS tampering on the local network. It doesn't check files, block a malicious download or protect against flaws in the Wi-Fi driver. Updates and security software do that job.