How to get rid of a Safari virus on your Mac or iPhone: Header image
Security 18 min read

How to get rid of a Safari virus on your Mac or iPhone

Published:Feb 16, 2026

Updated:Nov 18, 2026

Thanks to the increasing market share of Macs and MacBooks, the Apple ecosystem has never been a higher-value target for malware attacks. Unfortunately, the danger extends beyond macOS and iOS, reaching Apple’s default web browser, where a Safari virus has the potential to cause no end of problems.

Recent findings from Menlo Security show that attackers are increasingly exploiting web browsers to deliver malware via downloads, phishing tactics, and fake pop-up virus warnings that appear legitimate.

Despite the fact that Safari is widely accepted as the most secure browser, the fact remains that, like any other browser, Safari can still be infected by a virus. So, what is a Safari virus, and how do you remove it if you have one? We have the answers for you.

Can Safari get a virus, and what is it?

A “Safari virus” is a term often used to describe Safari malware that has infected the Safari browser on any Apple device, whether it’s a Mac, MacBook, iPad, or iPhone. So-called “Safari viruses” are typically not real viruses. Most cases involve browser hijackers, adware, spyware, or malicious extensions that interfere with the browser rather than replicating like traditional viruses.

A browser hijacker changes your browser settings or redirects your searches, while adware injects unwanted advertisements into web pages. These two are different from malicious extensions, which can sometimes access browsing data and track your online behavior, and could be a form of spyware. Scareware pop-ups are another type of “browser virus” which displays fake infection warnings, typically pressuring you into downloading suspicious anti-malware software.

Safari viruses aren’t limited to Macs, but on non-jailbroken iPhones and iPads, viruses are much less common. However, that’s not to say they’re completely safe, as Mobile Safari accounted for 18.5% of browser impersonations in bad-bot traffic in 2024. More realistic threats include installing unwanted apps or malicious configuration profiles.

Spyware stealthily installs itself to collect and track your browsing activity without your permission. Malicious browser extensions are add-ons with hidden code that can be downloaded from untrustworthy developers and quietly cause damage, including accessing saved passwords and other autofill data like credit card details.

Is the Safari virus real or just a fake warning?

Virus warnings are almost always fake. That’s because iPhones have no virus scanner, and Macs run protections quietly in the background and won’t demand that you download, pay, or remove detected malware. Genuine virus alerts will be Apple threat alerts that pop directly on your iPhone Lock Screen or in Settings, are received by email, or appear as notifications in your Apple Account. They are never Safari pop-ups.

Red flags of a fake notification to keep an eye out for include:

  • Countdown timers
  • Phone numbers to call
  • A pop-up like “4 viruses found on your device”
  • Alarm sounds instead of the usual notification “bing”
  • Bright colors and warning signs
  • Sender addresses that aren’t official Apple addresses.

Not all Safari virus alerts are easy to spot at first glance, so sometimes, you might need a little help. On Moonlock for iPhone, you can screenshot or copy and paste the suspicious notification into the built-in Scam Detect. Here’s how you do it:

  1. Install Moonlock for iPhone from the App Store.
  2. Sign up for a 7-day free trial.
  3. Tap Scam Detect from the bottom navigation bar.
  4. Copy and paste or upload the screenshot into the Moonlock Scam Detect.
  5. Tap Check.

Moonlock will use AI to analyze the text or pop-up notification to determine how likely it is to be a scam, then let you know what you should do next to stay safe.

How can Safari be infected by a virus?

Here are some of the ways that Safari can be susceptible to malware:

  • Fake prompts: Pop-ups or in-browser notifications may demand that you update Flash or install a new macOS update.
  • Freeware bundles: Malware and spyware might sometimes be hidden with other freeware like video converters.
  • Notification permissions: Notifications and pop-ups may appear disguised as site cookie permissions or requesting access to your location.
  • Ad redirections: Malicious ads appear that are meant to look like virus alerts, usually opening a scareware page if you click.
  • Unpatched browser vulnerabilities: The top browsers get regular security patches, but until unpatched vulnerabilities are discovered, zero-day threats can be exploited.
  • Old macOS operating systems: If you are running an old version of macOS, you’ll also be running an old version of Safari (the browser and the operating system are linked).
  • Malicious extensions: A browser’s usefulness is enhanced by its extensions. But extensions can also be a browser’s Achilles’ heel if any of them are packing destructive code.
  • Ignoring Safari’s security notifications: Safari warns you if a site you’re visiting is potentially problematic and/or doesn’t have an HTTPS security certificate. Ignoring these notifications will eventually lead to unwelcome visitors.
  • Downloading from sketchy sources: Downloading everything you can get your hands on, especially from illegitimate sources, is a risky practice. If the download source is an infected site, you’ll have problems.

On iPhone and iPad, the risk is still very real. You might find yourself with unrecognizable or malicious configuration profiles, sideloaded apps, jailbreak tweaks, or deceptive calendar subscriptions.

How to remove a Safari virus from your device

If you end up with a Safari virus on your devices, what’s the best, most efficient, and fastest way to remove it?

How to remove a Safari virus from your Mac with Moonlock

Screenshot of Moonlock, a Mac security app: The Malware Scanner screen.

The best way to fully remove the Safari virus from your Mac is by using Moonlock anti-malware software. Instead of having to search for the vulnerability in your browser and remove it manually, you can rely on a powerful antivirus to do it for you.

Still not sure? Try Moonlock for free and run your first anti-malware scan. Here’s what you need to do:

  1. Open Moonlock, then click on the Malware Scanner tab from the left-hand sidebar (it’s the cool-looking sunglasses icon). From the drop-down menu, we recommend selecting a Deep scan to make sure the scan covers all files. 
  2. Click Scan, and Moonlock will start methodically searching your Mac, looking for all traces of the Safari virus, as well as any other threats that might be hiding on your device. 
  3. Once the scan is complete, if Moonlock has found a Safari virus (or any other malware) on your Mac, it’ll isolate them in Quarantine and present them in a comprehensive list.
  4. All threats will be fully removed from your Mac with the help of Moonlock.
Screenshot of Moonlock, a Mac security app: The malware scan results screen.

How do you manually get rid of a Safari virus on a Mac?

Removing malware from your Mac or Safari manually can be difficult and may leave traces behind. A dedicated antivirus tool such as Moonlock can scan for and remove threats more reliably. If, however, you prefer to remove a Safari virus yourself, here are 10 steps outlining the areas you need to check on your Mac.

1. Force-quit Safari if pop-ups won’t close

If Safari keeps showing pop-ups constantly or won’t let you close tabs, do this:

  • Click on the Apple menu and select Force Quit.
  • Select Safari.
  • Click Force Quit.
  • Do not reopen Safari yet if pop-ups were aggressive. Turn off notifications first (see Step 2).

If you would rather use the command line, you can quit Safari directly from the Terminal by entering the following commands:

killall Safari
pkill Safari

“Killall Safari” sends a termination signal to close the Safari browser. While “pkill Safari” targets the name pattern of Safari rather than the exact process itself. You only need to run one of the commands.

2. Turn off suspicious website notifications

A lot of “Safari virus” warnings are fake, and some of the most common sources are spam notifications you have accidentally allowed. Scammers use fake notifications and pop-ups to prompt you into clicking, like clicking “Allow” to continue watching a video or approve website cookies. But clicking “Allow” might give the website permission to send notifications designed to deliver fake virus warnings and malicious links.

Here’s how you can fix many of the “Safari virus pop-up” notifications that show up:

  1. Open Safari, click Safari in the top menu, and select Settings.
  2. Go to the Websites tab and click Notifications. Look through the list of websites.
  3. Remove anything you don’t recognize or set them to Deny.
  4. You can also turn off “Allow websites to ask for permission to send notifications.”
Safari notification permissions can show suspicious websites that may cause Safari virus pop-ups

Alternatively, you can disable notifications through macOS settings:

  1. Navigate to the Apple menu > System Settings > Notifications.
  2. Under Application Notifications, select the suspicious website.
  3. Disable Allow Notifications.

3. Remove suspicious Safari extensions

Malicious browser extensions are a frequent cause of browser hijacking. They can expose sensitive data and sometimes even financial details.

Here’s how to check for malicious extensions:

  1. Navigate to Safari > Settings > Extensions.
  2. Review what’s installed, then Restart Safari after making changes.

Don’t recognize an extension or don’t remember installing it? Remove it. Safari doesn’t come with any pre-installed third-party extensions. So anything you don’t recognize is likely malicious.

Once done, restart Safari and check whether the unwanted behavior has stopped.

Safari Extensions settings where malicious extension linked to a Safari virus might be

4. Remove apps and installers that were not chosen

Check your Applications and Downloads folders for any recently installed apps or files that you didn’t install yourself. These could be malware downloaded via drive-by downloads when clicking a suspicious link. Under no circumstances should you open or run a file you don’t recognize.

There are many well-known hijacker apps like Dock2Master, WeKnow, and Spigot. Check .dmg or .pkg files, and verify the developer name before trusting them.

5. Clear Safari website data

Redirect loops and pop-ups can persist due to stored site data. 

Here’s how to clear it:

  1. Navigate to Safari > Settings > Privacy.
  2. Click Manage Website Data.
  3. Select Remove All (fastest option).
  4. Restart Safari.

This wipes the stored site scripts that may be triggering redirects. 

For caches:

  • Under Advanced, enable “Show features for web developers.”
  • Choose Develop > Empty Caches.
Safari Develop menu option used to clear browser cache

6. Restore your homepage and default search engine

When a browser hijacker takes over the Safari internet browser, it can alter settings like your default homepage and search engine.  It’s subtle, but it matters. A browser or search engine virus can redirect your searches through fake webpages or inject ads. Examples include Search Marquis, Search Baron, or Safe Finder. 

Here’s how to take a quick look:

  • Launch the Safari browser and go to Settings.
  • Click General.
  • See what’s listed in the Homepage field. If it’s unfamiliar, change it back to something you trust.
  • Open the Search tab.
  • Double-check that your preferred search engine is selected.

If, for any reason, your default homepage and search engine keep reverting to what you didn’t choose, run a virus scan with Moonlock to see if your browser has been hijacked.

Safari General settings showing homepage and startup options

7. Review Login Items

Certain unwanted apps restart automatically every time your Mac powers on. That can make a browser problem feel like it never goes away.

To check:

  1. Open Apple menu >  System Settings.
  2. Click General > Login Items & Extensions.

Then look through the following sections:

  1. Open at Login.
  2. Allow in the Background.

If anything looks unfamiliar or unnecessary, disable it. Restart afterward and see if the behavior stops.

Make sure you only disable entries you recognize as unnecessary, or you might lose access to some functionality on your Mac.

login-items-transparent

8. Start your Mac in Safe Mode

Sometimes, running your Mac in Safe Mode is the simplest way to start it safely, since there will be no extra processes running in the background. Only the basic essential programs and processes run under Safe Mode, hence the label  “safe.” 

For Apple Silicon macOS 27:

  • Shut down your Mac as usual.
  • Press and hold the power button until startup options appear.
  • Select your startup disk.
  • Hold Shift, then click Continue in Safe Mode.

Once you’ve successfully booted your Mac in Safe Mode, check:

  • Safari extensions.
  • Website data.
  • Login Items.

Remove anything suspicious or unrecognizable.

Once you’re done, restart your Mac normally. If the problem persists, the issue may be with a suspicious Login Item. Go back into Safe Mode and disable suspicious Login Items one at a time to identify the cause.

Here’s how to run your Mac in Safe Mode.

For Apple silicon (M1 through M3):

  • Turn off your Mac or MacBook.
  • Wait a few seconds, then hold the Shift key until startup options appear.
  • Choose your startup disk.
  • Hold Shift, then click Continue in Safe Mode.

For Intel Macs:

  • Restart your Mac or MacBook.
  • Quickly press and hold Shift.
  • Once the login screen appears, you can let go of the Shift key.

Once you’re in:

  • Recheck extensions.
  • Clear website data.
  • Look at Login Items again.

Then restart normally.

9. Review configuration profiles

Configuration profiles are often legitimate, especially on school or work devices. But occasionally, one gets installed through a bundled app or fake update and quietly manipulates the settings.

To review them:

  1. Open System Settings from the Apple Menu.
  2. Select General, then Device Management.
  3. Select a profile to inspect its details, including controls and organization.

If you see one you don’t recognize, especially something tied to web or certificate settings, remove it.

If the Mac is loaned to you by your company or institution, do not tamper with the profiles to avoid potentially alerting IT security. Some profiles are required for access to work or school services.

10. Check LaunchAgents (advanced step)

If Safari issues return after every reboot, something in the background is being automated to relaunch every time the browser starts.

Go to Finder, select Go, and go to Folder.

Afterward, paste each location one at a time:

  • ~/Library/LaunchAgents
  • /Library/LaunchAgents
  • /Library/LaunchDaemons
  • /Library/Application Support

Scan for recently added files or oddly named .plist items and applications, or the scripts referenced by those files. Checking Application Support can help you catch any malicious launch agents that point to payloads not stored in the LaunchAgents folder.

Examples of recent malware include:

  • com.zoom.plist
  • com.install.plis
  • us.zoom.ZoomDaemon.plist

If you’re unsure about a file, leave it alone so you don’t affect the system.

11. Update macOS (Safari updates with it)

An outdated version of macOS leaves you vulnerable to attackers, since it can contain security gaps that must be patched. Since Safari updates come through macOS, completing a software update of your OS closes any entry points that attackers can take advantage of. 

Here’s what to do:

  • Open System Settings > General > Software Update.
  • If your OS is already the latest version, you don’t need to do anything.
  • If there is an available update, install it as soon as possible.
  • After the installation has completed, restart your Mac.
  • Now you can launch Safari and be confident that it’s more secure.
macOS Software Update settings checking for security updates

Can macOS remove a Safari virus on its own?

Mac devices have built-in virus protection, but this alone doesn’t guarantee the complete detection and removal of every Safari threat. You have different capabilities with XProtect:

  • XProtect: Detecting known malware
  • XProtect Remediator: Checking for and removing known malware
  • Gatekeeper: Blocking untrusted software from running
  • Notarization: Checking developer-distributed apps for malicious content

Even though Macs have a virus checker called XProtect, there are times when it may not be enough to catch all malware, including a Safari virus.

You need to remember that malware and viruses are developing and evolving all the time. XProtect is good, but it isn’t always up to date with the latest threats. Only a regularly updated antivirus platform like Moonlock can truly erase all threats.

How to get rid of a Safari virus on an iPhone

To get rid of a redirect or adware virus on your iPhone Safari, try these steps:

  • Go to Settings > Apps > Safari.
  • Tap Clean History and Website Data.
  • Check Settings > Apps > Safari> Advanced > Website Data and remove any suspicious data.

To disable unfamiliar Safari Extensions:

  1. Go to Settings > Apps > Safari > Safari Extensions.
  2. Remove anything you don’t use or recognize.

For suspicious profile configurations:

  1. Go to Settings > General > VPN & Device Management.
  2. Check suspicious profiles and remove them.

As a last resort, if the problem persists, tapping Reset All Settings will preserve personal data but reset all settings to defaults. Erase All Content and Settings will delete everything, so make sure you have a clean backup. 

To make sure nothing like this happens again, install Moonlock for iPhone from the App Store, and follow the advice to get a higher Security Score for your iPhone.

Available with a 7-day free trial of Moonlock, it will check your iPhone for a secure Wi-Fi connection, secure passcode, hidden IP address, and email address in recent breaches.

How to remove a Safari virus on an iPad

If you’re using an iPad running iPadOS 27, you’ll still need to do the same cleaning steps:

  1. Check Safari windows in Split View or Stage Manager.
  2. Open the tab overview to close unwanted tabs individually.
  3. Follow the same steps as on an iPhone.

The signs of a Safari malware infection

Before you can remove a Safari malware infection, you first need to be able to recognize it. Here are some of the similarities between a MacBook infection and an iPhone infection:

On Mac:

  • Unexpected redirects: Browser hijacker
  • Persistent pop-ups: Adware
  • Changed homepage or search engine: Browser hijacker
  • Unfamiliar extensions added: Potentially unwanted software
  • Fake virus alerts: Scareware
  • Safari opening tabs automatically: Malicious extensions or scripts

On iPhone and iPad:

  • Fake virus warnings: Scareware or browser notifications
  • Unexpected redirects: Malicious ads or website scripts
  • Calendar spam: Unwanted calendar subscriptions
  • Unknown Safari notifications: Misused website permissions
  • Unexpected extensions: Unwanted browser modifications

Does Safari offer protection against malware?

Safari doesn’t include a traditional antivirus engine, but it does have built-in protections that help reduce your exposure to Safari malware and suspicious websites. These safeguards lower the chances of infection, but they don’t guarantee that you’ll never need Safari virus removal or have to remove malware from Mac Safari. If something slips through, running a Safari virus scan is one of the fastest ways to catch it early and get rid of a virus on Safari before it spreads.

Some of Safari’s built-in protections include:

  • Fraudulent website warnings: Safari alerts you when you attempt to visit sites suspected of phishing or malware distribution, a common source of a virus Safari infection.
  • Pop-up blocking: The browser automatically blocks many intrusive windows, helping reduce Safari pop-up virus scams and suspicious Safari virus pop-up messages.
  • Cross-site tracking prevention: Safari limits how websites track your activity, lowering the risk of silent data collection often tied to spyware.
  • Cookie controls: You can block third-party cookies (or all cookies) to strengthen privacy, though some sites may not function properly afterward.

These features create a solid first layer of defense, but they aren’t foolproof. If your browser starts redirecting, if your web search is behaving oddly, or if it looks like Safari has been hijacked by malware, it’s time to scan Safari for malware and take action to remove a virus from Safari Mac with antivirus software before it worsens.

What can happen if you ignore a Safari virus

A Safari virus rarely stays harmless. The longer it lingers, the more it can interfere with how your browser and system behave. Risks include the following.

Sensitive data exposure

A Safari virus can quietly steal your personal data from your device, including saved passwords, credit card info, login credentials, and even your browsing history, things you want to keep private. Because this often happens in the background, many people don’t notice until damage is already done. This can mean fraudulent charges being made, identity theft, or someone gaining unauthorized access to accounts.

Persistent browser issues

When Safari is affected, the issues tend to linger. You might notice redirects happening more often, extensions appearing that you don’t remember installing, or repeated virus alerts. Ignoring these issues usually makes the experience more frustrating over time.

Increased risk of scams

A Safari virus that installs adware and malicious redirects can push you toward fake downloads or phishing pages that appear as real websites. They are designed to lure you into inputting your credit card information. The goal is to steal this information and other sensitive data, like login credentials, banking information, or Social Security numbers.

Sometimes, attackers cleverly use typosquatting by interchangeably replacing letters like lowercase L with an uppercase I (“l” vs. “I”) to appear legitimate. These are clever tricks used to convince you that a fraudulent website is legitimate. 

Slower performance

Safari malware can slow down the Safari internet browser and your device due to the high-level consumption of memory and processing power it can demand. Consequently, this can result in a frustrating user experience by making your Apple device run slower and causing websites to load longer than usual. 

There have been cases in which cryptominers have been installed on users’ devices via their web browsers, causing devices to overheat due to extreme CPU usage and resource drain, even when users didn’t actively use their devices.

Harder cleanup later

It is better to fix a problem early than be sorry later on. The same applies to Safari malware when it remains undetected on your Mac device because you didn’t run a simple virus scan on Mac. That’s because the longer they are on your device, the more files can get added, settings can be changed, or backdoors can be installed. This makes it harder to clean up the malware, which is why early detection and removal of a Safari virus with Moonlock is a smarter choice.

How to prevent Safari virus infections

All of this can be easily circumvented by simply knowing how to prevent a Safari virus infection in the first place. There are some common things you can do that will drastically reduce your chances of it happening to you.

Never download anything outside the App Store

Going outside of the Apple App Store for apps and software heightens the chances of malware reaching your Apple device. For secure, safe apps, your best bet is the App Store.

Sure, some third-party developers make shiny, cool apps that promise to make your Mac even better. But how do you know they haven’t included any nasty extras?

Always use a VPN

When you use the internet, you leave yourself vulnerable to a myriad of online threats, particularly if you’re using a public network like Wi-Fi at a café or an airport. However, hackers can’t get to your network traffic if it’s continuously being redirected through a secure, encrypted server in a whole other geographic location. That’s why we always recommend you use a VPN before connecting to the internet.

Moonlock’s VPN, powered by ClearVPN, ensures that you’re never left unprotected, with a Kill Switch feature that cuts off your connection if your VPN drops. We also have a strict no-logs policy, honoring our commitment to both privacy and security.

Screenshot of Moonlock, a Mac security app: the VPN screen.

Make sure your network is properly configured

If you don’t put a password on your Wi-Fi network and make sure all other settings are properly configured, you’re asking for trouble. Always add a password, and if anybody you don’t know or trust asks for your login details, don’t give them!

Enable built-in security tools on your MacBook

A screenshot of the Privacy & Security settings in macOS.
macOS is a trademark of Apple Inc.

Your Mac has some built-in security tools, but key features like FileVault and Firewall are disabled by default until you switch them on. Gatekeeper, which protects against malicious apps, can also be switched off, although this isn’t recommended.

Always enable these tools and keep them on. Just go to System Settings > Privacy & Security and select your preferences. To make sure you’re not missing anything, use Moonlock’s System Protection to go through your system’s settings. It’ll configure your Mac for maximum protection and will help you turn off any risky configurations. Even with a free trial of Moonlock, the optimized security tools are yours to explore!

Screenshot of Moonlock, a Mac security app: The System Protection screen

Malicious email or SMS links are the easiest “low effort, high reward” method for hackers to get a Safari virus onto your device. Once a user unwittingly clicks that link, the virus is off to the races. Always check link previews and URLs before tapping, especially in text messages.

Use Moonlock’s Safe SMS to automatically filter scam and spam text messages containing suspicious links. It’ll take them out of your inbox, letting you review what was caught and why it is a threat.

Only click links if they come from trusted sources (family members, friends, and colleagues). Even then, you may want to exercise caution and go to the website directly and log in.

Another option is to right-click the link, copy it, and run it through VirusTotal. The service will tell you if the destination is safe or not.

Immediately install all macOS and app updates

You must always install any system updates or app updates. These sometimes represent improved system stability or new features, but they also patch security vulnerabilities based on new threat information. Look for new macOS updates by going to System Settings > General > Software Update.

Browser viruses are just one of many forms of malware making the rounds on the internet today. But they can all be easily combated by following some common-sense rules, using Moonlock to frequently run malware checks, and frequently reading our articles for advice.

This is an independent publication, and it has not been authorized, sponsored, or otherwise approved by Apple Inc. Safari, macOS, and iOS are trademarks of Apple Inc.

Ray Fernandez

Ray Fernandez

Ray has been covering tech and cybersecurity for over 15 years. His work has appeared on TechRepublic, VentureBeat, Forbes, Entrepreneur, and the Microsoft Blog, among others.