Safari malware and pop-ups: how to clean Safari on a Mac
What looks like Safari malware may not be a virus inside Safari at all. It can be a fake pop-up, an extension you did not mean to install, or adware that came with another download. Do not click inside a pop-up, because some have fake close buttons. Quit Safari and reopen it with the Shift key held. Remove extensions you did not install in Safari > Settings > Extensions. Then check your homepage, search engine and website data, and the Applications folder.
Three things usually look like Safari malware. A pop-up claims the Mac is infected. A homepage or search engine keeps changing. Or there is an extension you cannot place. All three are fixable from Safari's own settings, and this page goes through them one by one, in order.
01What Safari malware usually is
Some pop-ups are third-party ads that use phishing tactics, such as warnings or prizes. They try to make you believe they come from Apple or another trusted company, so you will share personal or financial information. Phishing means tricking you into handing over data. Others offer free downloads, software updates or plug-ins to trick you into installing unwanted software.
If pop-ups just will not go away, you might have unintentionally downloaded and installed adware, which is advertising-supported software, or other unwanted software. Certain third-party download sites include software you do not want along with the software you do.
Hijackers fit this pattern too. Search Baron, for one, settles in as an extension and sets its own site or Bing as the default search engine.
So look past Safari itself: at what it shows you, and the extension or app behind it.
02Does Safari have built-in malware protection?
Partly. In the Security tab of Safari settings you can turn on the setting that warns you when you visit a fraudulent website. Beyond the browser, macOS runs XProtect, which automatically detects and blocks known malware. What XProtect covers is on the XProtect page.
03Are Safari virus warnings real?
Treat a warning in a web page as a scam. Misleading pop-ups and ads that say your device has a security problem are one of the ways scammers trick people. Apple never asks for your password or security codes to provide support. Never share personal or security information, and never agree to enter it into a webpage that someone directs you to.
Never call a phone number that appears in a pop-up window. Phone scams that impersonate Apple Support are on the same list. When an unexpected message asks for something, it is safer to presume that it is a scam. Contact the company directly if you need to. The virus pop-up page covers specific warnings.
04Signs that something is in Safari
| What you notice | What to do |
|---|---|
| The home page changes or redirects you to sites you did not intend to visit | Check the Extensions tab, then the homepage and search engine |
| New toolbars or add-on programs | Check the Extensions tab, then the Applications folder |
| Pop-ups that will not go away | Adware may be installed; see remove adware |
One sign is a reason to look, not proof. The full signs table is on signs of a virus.
05How to clean Safari on a Mac
The order goes from what you see to what sits behind it. You open Safari's settings from the menu bar with Safari > Settings.
Close the pop-up without clicking, and reopen Safari with Shift held. Unless you are confident they are legitimate ads, avoid interacting with pop-ups or webpages that seem to take over your screen. Some pop-ups and ads have fake buttons that resemble a close button, so use caution if you try to close one. Quit Safari instead, then press and hold the Shift key while opening it. This prevents Safari from automatically reopening any windows or tabs that were open.
Check the Extensions tab. Choose Safari > Settings, click Extensions and look for any unnecessary extensions. An extension is a small add-on program for the browser. Select the one you do not remember installing, then click Uninstall.
Check the Websites and Security tabs. In the Websites tab, click Pop-up Windows on the left to allow or block pop-ups for some or all websites. In the Security tab, turn on Warn when visiting a fraudulent website.
Set your search engine and homepage back. Choose Safari > Settings, then click Search, and pick your engine in the Search engine menu. Private Browsing has its own menu there. For the homepage, click General and enter the address in the Homepage field, or click Set to Current Page.
Remove website data you do not want. Choose Safari > Settings, then click Privacy. Manage Website Data shows which websites store cookies and other information on your Mac, and lets you remove it for individual websites or all of them.
Check the Applications folder. Look for apps you do not expect. If one arrived with a download from a site you do not trust, remove it. Dragging an item to the Trash does not delete it until you empty the Trash.
Check login items, then update and restart. Unknown login items, which are apps that start when you log in, might cause redirection. Update to the latest version of macOS, and if it is already current, restart, because macOS includes a built-in tool that removes known malware when restarting. The click paths for both are on remove adware. If your homepage was redirected, see browser hijacker.
06When it is more than Safari
A pop-up is sometimes the first step of something larger. Malicious commands or scripts that a website, email or message tells you to paste into Terminal are one of the ways scammers trick people. Terminal is the app where you type commands. Do not paste a command from a web page you do not understand. More on pasted commands and built-in protection is on do I need antivirus.
If you already pasted one, or if a password prompt appeared in the middle of an install, stop logging in to online accounts with sensitive information, such as shopping or banking. An infostealer, a program that copies passwords and logins off the Mac, is the worse case: one called AMOS has harvested saved passwords and session data (what keeps you logged in to sites) from Chrome, Edge, Safari and Firefox. Session data is what keeps you signed in to a site. Change your passwords from a trusted device and turn on two-factor authentication. The infostealer check and check for virus go from there. The general cleanup is on remove malware.
07How to keep Safari clean
Get software from the App Store, the safest way to download apps. Otherwise, get it directly from the developer or another reliable source, rather than through an ad or link. Scammers place bogus ads for software on social media sites and on search engines.
A website that wants to send you notifications has to ask for your permission first. Treat that prompt like any other request. How malware reaches a Mac in general is on can Macs get viruses.
08The short version
Safari malware is usually a fake pop-up, an unwanted extension or adware that came with another download. Remove extensions you did not install, put your homepage and search engine back, clear website data you do not want, and check the Applications folder and login items. Then update macOS and restart. If a command was pasted into Terminal, or a password prompt came out of nowhere, go on to the full check.
FAQ
How to clear malware from Safari?
Work through the steps above in order. Remove extensions you did not install in the Extensions tab of Safari settings, put your search engine and homepage back, clear website data you do not want, and check the Applications folder for apps you do not expect.
How do I know if Safari has malware?
Look for a homepage that changes or redirects you, new toolbars or add-ons and many pop-up ads. Pop-ups that will not go away may mean adware. One sign is a reason to check, not proof.
Are Safari virus warnings real?
Treat them as scams. Misleading pop-ups and ads that say your device has a security problem are a scam tactic Apple lists. Some use warnings or prizes to make you believe they come from Apple.
Does Safari have built-in malware protection?
Safari has a setting in the Security tab that warns you when you visit a fraudulent website. At the macOS level, XProtect automatically detects and blocks known malware. The built-in layers are on XProtect.
Can websites send me notifications without asking?
No. A website designed to send you notifications asks for your permission first. A notification prompt you do not want is a good moment to say no.
Related guides
Sources
- Apple Support, pop-ups and malware on Mac
- Apple Support, avoid and report scams
- Apple Support, protecting against malware
- Apple Support, Login Items & Extensions
- FTC Consumer Advice, how to recognize, remove and avoid malware
- Microsoft Security, ClickFix campaign with fake macOS utilities
- Microsoft Security, hunting infostealers on macOS
- Artificial Immunity