Skip to content

Original privacy and security research, news and free tools since 2018, cited by the FBI, CISA and the World Economic Forum See our research

Cited by the FBI, CISA and the World Economic Forum

Guide

Can an iPhone Get a Virus From a Website? What Can Really Happen

Published Updated

Miklos Zoltan

By Miklos Zoltan

Founder & Editor-in-Chief

Laura Bede

Fact-Checked this

On an up-to-date iPhone, almost never. On one running old iOS, a visit to the wrong website was enough to get infected as recently as March 2026.

That split decides everything below. The “your iPhone has a virus” warning you just saw in Safari is almost certainly a scam page, not an infection. Real website attacks on iPhones do exist, they are rare and expensive, and so far every one of them has stopped working once Apple shipped a fix.

Why a website usually can't infect an iPhone

A web page runs inside the browser, and the browser runs inside a sandbox. Apple’s platform security guide says every third-party app is sandboxed so it can’t gather or change data stored by other apps, or change the device. Safari’s web content is walled off in the same way.

iOS also won’t run a program you download from a page. On a Windows PC a site can hand you an .exe; on an iPhone, apps come from the App Store (or, in the EU, approved alternative stores), and a random file from a website just sits in the Files app.

So to infect an iPhone through a web page, an attacker needs a chain of unknown bugs: one to run code in the browser, one to escape the sandbox, and one to take over the system underneath. Each link is a rare and pricey find. Outside the EU every iPhone browser uses Apple’s WebKit engine, so Chrome or Firefox on an iPhone share Safari’s bugs and Safari’s fixes.

When websites did infect iPhones

It has happened, and the cases follow a pattern. Someone builds or buys an exploit chain, plants it on a hacked site or a convincing fake, and waits for iPhones running the right iOS version to visit.

Known website attacks on iPhones
Attack
When
Delivered through
iOS hit
Fixed in
Project Zero case
2016–2019
A few hacked websites; every visiting iPhone was attacked
iOS 10 to 12.1.3
iOS 12.1.4 (7 February 2019)
LightSpy
2020
Links on Hong Kong forums to copied local news pages
iOS 12.1 and 12.2
Any later iOS version
Coruna
2025
A surveillance vendor’s customer, hacked Ukrainian sites, fake Chinese finance and crypto sites
iOS 13.0 to 17.2.1
Current iOS; iOS 15.8.7 and 16.7.15 for older iPhones (11 March 2026)
DarkSword
Nov 2025 – Mar 2026
A fake Snapchat site (Saudi Arabia), campaigns in Turkey and Malaysia, hacked Ukrainian sites
iOS 18.4 to 18.7
iOS 26.3, or iOS 18.7.7 for iPhones staying on iOS 18
The 2019 chain and part of DarkSword were zero-days, so for a while even fully updated iPhones were exposed. Once Apple shipped the fixes, updated iPhones were out of reach.
Sources: Google Project Zero (August 2019), Trend Micro (March 2020), Google Threat Intelligence Group (March 2026), Apple support note 126776; checked 14 November 2026.

2019: hacked sites, any visitor

Google’s Project Zero described in August 2019 a small group of hacked websites that attacked every iPhone that opened them, for at least two years. The researchers estimated the sites had thousands of visitors a week. Five exploit chains covered iOS 10 to iOS 12, and the implant could read messages from apps such as WhatsApp and iMessage, photos and live location. Google reported the bugs on 1 February 2019 and Apple fixed them in iOS 12.1.4 six days later.

2020: fake news links in Hong Kong

Trend Micro found links on popular Hong Kong forums that led to copies of local news pages. A hidden frame on the page tried to install spyware on iPhones running iOS 12.1 or 12.2. Anyone on a newer version was out of reach.

2026: Coruna and DarkSword

This is where the old advice (“only spies get hacked this way”) stopped being true. In March 2026 Google’s Threat Intelligence Group described Coruna, a kit of 23 exploits for iOS 13.0 to 17.2.1. It started with a surveillance vendor’s customer, moved to hacked Ukrainian websites, and by the end of 2025 sat on a large set of fake Chinese finance and crypto sites that served it to any iPhone, wherever it was.

Two weeks later came DarkSword, aimed at iOS 18.4 to 18.7. Google saw it on a Snapchat-themed fake site targeting users in Saudi Arabia, in campaigns in Turkey and Malaysia, and on hacked Ukrainian sites until March 2026. The malware it dropped went after messages, photos, location and crypto wallets. One of those sites even told visitors using Chrome to switch to Safari, which says something about how narrowly these chains are built.

Apple’s answer was blunt. Its support note Update iOS to protect your iPhone from web attacks says iPhones kept up to date were not at risk, then lists updates for phones stuck on older versions, down to iOS 15. Apple also pushed Lock Screen alerts to iPhones still on old versions.

"Your iPhone has a virus": the pop-up is the scam

A web page can’t scan your phone. When Safari suddenly shows a red warning with Apple’s logo, a countdown and a support number, that page is an advert or a scam site doing the only thing it can do, which is frighten you into acting. Apple’s scam guide says to ignore these warnings, close the page and never call the number.

What the scammers want is for you to do the work for them:

  • call a fake support line that asks for your Apple Account password or remote access
  • pay for a “cleaner” app or subscription you don’t need
  • tap “Subscribe” on a calendar, which then fills your Calendar with fake virus alerts
  • install a configuration profile, which can let someone else control settings on your phone

If you only saw the warning and closed it, nothing happened to your iPhone. If the warning keeps coming back, see the next chapter.

What a bad website can really do to you

For most people the realistic risk from a website isn’t malware at all. It’s what you type into it.

A fake Apple, bank or delivery page can collect your password and the code you get by text, and that’s enough to take over an account without touching the phone. A “you’ve won” page can sign you up for a subscription. Safari’s Fraudulent Website Warning, which checks addresses against Google Safe Browsing and Apple’s own lists, catches many of these pages but not all, especially new ones.

For more on links that arrive by email or message, see can you get hacked by opening an email.

I tapped something on a dodgy site: what now?

Work through this in order. Most people can stop after the first three steps.

  1. Close the tab. If it won’t close, open the App Switcher and swipe Safari away, then go to Settings > Apps > Safari > Clear History and Website Data.
  2. Check Calendar for spam. In the Calendar app tap Calendars, then the info button next to any calendar you don’t recognise, and choose Unsubscribe or Delete Calendar, as Apple describes.
  3. Check for profiles. Go to Settings > General > VPN & Device Management. If you see a profile you didn’t install for work or school, remove it.
  4. If you typed a password, change it on the real site or app, starting with your Apple Account and email, and turn on two-factor authentication where you can.
  5. If you gave card details, call your bank using the number on the card.
  6. Update iOS (Settings > General > Software Update). This is the step that matters if your iPhone was behind on updates when you visited the site.

If your iPhone was on an affected iOS version and you visited a site linked to one of the attacks above, updating closes the hole but can’t prove nothing ran before. For that case the cleanest route is a backup, a full erase (Settings > General > Transfer or Reset iPhone) and a fresh setup.

Apple also sends threat notifications to people it believes were targeted by mercenary spyware, by Lock Screen alert, by email and on account.apple.com. A real one never asks you to click a link or install anything, which makes it easy to tell from the fakes.

How to keep your iPhone safe from web attacks

Updates are the whole game. Every web attack in the table above needed an iPhone that was behind on iOS, or a bug Apple hadn’t fixed yet.

  • Turn on automatic updates. Settings > General > Software Update > Automatic Updates. On iOS 26.1 or later, also check that Settings > Privacy & Security > Background Security Improvements is set to install automatically. Apple uses it to ship Safari and WebKit fixes between full updates.
  • Keep Safari’s protections on. Settings > Apps > Safari > Fraudulent Website Warning and Block Pop-ups.
  • Don’t install profiles that a website or a stranger asks you to install.
  • Consider Lockdown Mode if you’re a likely target (journalist, activist, official) or stuck on an old iOS version. Apple says it blocks some complex web technologies and protected phones from Coruna and DarkSword even on out-of-date software. It makes some websites and messages clunkier, so it isn’t for everyone.
  • Skip the “iPhone antivirus”. Because of the same sandbox that protects you, such apps can’t scan other apps or the system. What they sell is mostly link filtering, breach alerts or a VPN.

A VPN doesn’t help here either. It encrypts the connection between you and the VPN server, but a malicious page still loads in your browser exactly as before. We explain the difference in does a VPN protect you from viruses, and how attacks that need no tap at all work in our guide to zero-click exploits.

Frequently Asked Questions

Some people found answers to these questions helpful

Can an iPhone get a virus from Safari?

Not from an ordinary website on an up-to-date iPhone. The known cases needed unpatched bugs in Safari's WebKit engine plus an iPhone on an affected iOS version, the most recent being the Coruna and DarkSword kits disclosed in March 2026.


Is Chrome on an iPhone safer than Safari?

Not against these attacks. Outside the EU, Chrome on an iPhone uses Apple's WebKit engine, so it has the same bugs and gets the same fixes through iOS updates.


Can an iPhone get a virus just by visiting a website without tapping anything?

Yes, if the site carries an exploit chain for your iOS version. That's what the 2019, Coruna and DarkSword attacks did. A pop-up claiming you're infected is a different thing: it's a scam that needs you to act.


Do jailbroken iPhones get malware more easily?

Yes. A jailbreak removes protections such as app signing checks, and people install apps from outside the App Store. The website exploit kits above didn't need a jailbreak, though.


How do I know if my iPhone has malware?

There is no reliable built-in scan. Watch for configuration profiles or calendar subscriptions you didn't add, and for Apple threat notifications. Battery drain or heat on their own usually have ordinary causes. If you suspect targeted spyware, update, back up, erase and set the phone up again.


Do I need antivirus on my iPhone?

No. iPhone antivirus apps can't scan the system or other apps. Automatic updates, Safari's Fraudulent Website Warning and care with profiles and links do more.