---
title: "Can You Get a Virus Just by Visiting a Website? | Browser.lol"
description: "Can you get a virus just by visiting a website? Rarely, with an updated browser. How drive-by downloads work, what infects people instead, and what to do."
url: "https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking"
language: "en"
---

1. [Home](https://browser.lol/en)
2. [Blog](https://browser.lol/en/blog)
3. [Security](https://browser.lol/en/blog#security)

# Drive-By Downloads: Can a Website Infect You?

Can you get a virus just by visiting a website? Rarely, with an updated browser. How drive-by downloads work, what infects people instead, and what to do.

[Janis Zesiger](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#author) February 26, 2026 Updated November 19, 2026 5 min read

![Drive-by download illustrated: a download box drops out of a browser window, the way malware can reach a device from a web page](https://browser.lol/img/blog/drive-by-downloads/hero.webp)

You can rarely get a virus just by visiting a website: with an updated browser, a drive-by download (malware that installs itself during a visit) needs a security hole that is not fixed yet. Most infections start with something the page talks you into: a fake download, a fake update or a command to paste.

## Key takeaways

1. Private or incognito windows change nothing: the page still runs on your device.
2. Real browsers never ask you to download an update from a web page.
3. Mass drive-by attacks faded after [Adobe ended Flash in December 2020](https://www.adobe.com/products/flashplayer/end-of-life.html).

## Can you get a virus just by visiting a website?

Your browser runs every page in a sandbox, a sealed box away from your files. Switzerland's [national cyber security office](https://www.bacs.admin.ch/en/26w40-en) says opening a website infects a device only in very rare cases.

Attacks through unknown holes, called zero-days, mostly target chosen people such as diplomats, and a fixed hole is closed for everyone who updates.

![Drive-by download explained: a web page's code is locked inside the browser's sandbox box on a laptop, and only a hand reaching in from outside, the user, can carry a file or command out of it](https://browser.lol/img/blog/drive-by-downloads/sandbox.webp)

Page code is locked in the sandbox, so most attacks ask you to carry something out.

## What is a drive-by download?

The attacker plants code on a page you visit, often a hacked but genuine site or an ad on it. Every stage has to work:

1. You open a page

   A hacked site, or an ad on a normal one

2. Hidden code checks you

   Browser, version, system, country

3. Attack code runs

   Only if a matching hole is still open

4. Breaks out of the sandbox

   Usually needs a second hole

5. Malware installs

   Without a prompt or a click

Out-of-date devices are the ones at risk: by November 2026, Chrome had fixed eight holes attackers were already using. Our [Chrome zero-day tracker](https://browser.lol/en/blog/zero-day-exploits-why-your-browser-is-vulnerable) shows how to check you have the fix.

## How do you actually get malware from a website?

Instead of breaking out of the sandbox, attackers ask you to step out of it. In Microsoft's [Digital Defense Report 2025](https://cdn-dynmedia-1.microsoft.com/is/content/microsoftcorp/microsoft/msc/documents/presentations/CSR/Microsoft-Digital-Defense-Report-2025.pdf), 47% of break-ins at the organisations it protects began with a pasted command, and 1% with a security hole.

How web pages get malware onto devices in 2025 and 2026

| The trick                                                                             | What it asks of you                  | Real case                                                                                                                                         |
| ------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Fake download](https://browser.lol/en/blog/malvertising-when-the-ad-is-the-attack)   | Install a copied app                 | [Fake ChatGPT site](https://www.malwarebytes.com/blog/threat-intel/2026/05/fake-chatgpt-download-site-infects-windows-and-mac-users-with-malware) |
| Fake browser update                                                                   | Run an 'update' file                 | [14,971 hacked sites](https://www.politie.nl/en/news/2026/june/18/international-law-enforcement-initiate-hunt-on-malware-group-socgholish.html)   |
| ClickFix (a fake check)                                                               | Paste a command, press Enter         | Fake 'verify you are human' boxes                                                                                                                 |
| [Bad extension](https://browser.lol/en/blog/browser-extensions-the-supply-chain-risk) | Add it to your browser               | [4.3 million installs](https://www.bleepingcomputer.com/news/security/shadypanda-browser-extensions-amass-43m-installs-in-malicious-campaign/)    |
| Fake virus alert                                                                      | Call a number or install a 'cleaner' | Tech support scam pop-ups                                                                                                                         |

Risk:

No real website asks you to paste a command

A real check happens inside the page and never needs Run, PowerShell or Terminal. Never paste what you did not copy: a page can fill your clipboard by itself, even from a Browser.lol session.

## Is antivirus enough, and why does it fail?

For most people, yes: the free antivirus built into Windows is enough if it stays on and updated. In AV-Comparatives' [test of February to May 2026](https://av-comparatives.org/tests/real-world-protection-test-february-may-2026/), Microsoft Defender blocked 396 of 400 live malicious addresses; the best product blocked 399.

### Antivirus stops

Pros

- Known malicious files
- Programs that behave suspiciously
- Addresses its maker knows are bad

### Why antivirus fails

Cons

- Brand-new malware it cannot recognise yet
- A command you paste and run yourself
- A password typed into a fake page

## How to prevent drive-by downloads and fake downloads

The padlock in the address bar only means the connection is encrypted: the fake ChatGPT site had one too.

- Let your browser and system update, and relaunch the browser when it asks
- Get software only from the maker's site, typed by hand, or an app store
- Use an ad blocker when you search, as the [FBI recommends](https://www.ic3.gov/PSA/2022/PSA221221)
- Close any page that wants an 'update', an extension or notifications
- Remove extensions you no longer use
- Work in a standard account, one without administrator rights

Not sure about a site or a download page? Open it in a throw-away Browser.lol session: its code runs on our servers, which delete the session when it ends.

[Start a session](https://browser.lol/en/create)

## What to do if you think a website infected you

Password stealers send saved passwords and login cookies (what keeps you signed in) away within seconds and often leave nothing for a scan to find. On a work device, tell IT before you clean anything.

- You only opened the page and closed it

  Almost certainly fine on an updated device.

- A file downloaded, but you never opened it

  Delete it and empty the bin.

- You allowed notifications from the site

  Not a virus. Remove the site's permission in site settings.

- You typed a password or card number on the page

  Phishing, not malware. Change that password now; call your bank about the card.

- You opened a file, installed something or pasted a command

  Go offline, change passwords from another device, email first, sign out everywhere, then run a full antivirus scan.

- A scan finds something, or you remain unsure

  Back up your files and reinstall the device, as the [Swiss office](https://www.bacs.admin.ch/en/26w40-en) advises.

If money is gone, call your bank first, then report it to the police.

## Frequently asked questions

**Can a phone get a virus from a website?**

Rarely, and almost only when out of date: Coruna, an attack toolkit Google found in 2026, infected iPhones through websites, but only on iOS 13 to 17.2.1. On Android, a site's app file cannot install itself unless you turn on 'Allow from this source' for your browser.

**Can a Mac get malware from a website?**

Yes. In 2026, ClickFix pages and fake Claude and ChatGPT downloads targeted Macs with password stealers; macOS Tahoe 26.4 and later warn about possible ClickFix attacks, Malwarebytes reports.

**How do I know if my computer has malware?**

Often there is no sign. Watch for extensions you did not add, a changed search engine, sign-ins you did not make and passwords that stopped working.

**Can a website infect me through a cloud browser?**

Its code and downloads stay in the session on a remote server unless you press 'Save to device', so they cannot reach your device directly. Its browser can be a few days behind the newest Chrome fix, but an attack would land on that throw-away computer.

## Janis Zesiger

Founder of Browser.lol and Guard.ch

Janis Zesiger founded Browser.lol and Guard.ch and runs Zesiger.net in Switzerland. Janis builds the isolated session platform behind both products and writes about browser security, privacy and AI agents that use the web.

[LinkedIn](https://www.linkedin.com/in/janis-zesiger/) [zesiger.net](https://zesiger.net/)

Try it in a disposable session

Start a real desktop browser in your tab. There is nothing to install, and everything is deleted when the session ends.

[Start a session](https://browser.lol/en/create)

In this guide

1. [Can you get a virus just by visiting a website?](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#answer)
2. [What is a drive-by download?](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#drive-by)
3. [How do you actually get malware from a website?](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#common)
4. [Is antivirus enough, and why does it fail?](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#antivirus)
5. [How to prevent drive-by downloads and fake downloads](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#prevent)
6. [What to do if you think a website infected you](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#infected)
7. [Frequently asked questions](https://browser.lol/en/blog/drive-by-downloads-infected-without-clicking#faq)

## Related articles

[All articles](https://browser.lol/en/blog)

- Security

  ### [Chrome Zero-Day Exploits 2026: Is Your Browser Vulnerable?](https://browser.lol/en/blog/zero-day-exploits-why-your-browser-is-vulnerable)

  Every Chrome zero-day exploited in the wild in 2026, how to update Chrome, Edge, Firefox and Safari, and how to close the patch gap attackers rely on.

  October 28, 2025

- Security

  ### [Malvertising: How Fake Ads Spread Malware in 2026](https://browser.lol/en/blog/malvertising-when-the-ad-is-the-attack)

  Malvertising hides malware behind real ads: fake ChatGPT and Claude downloads, fake CAPTCHAs, scam pop-ups. How to spot them and what to do if you clicked.

  January 15, 2026

- Security

  ### [How to Open a Suspicious Link Safely (Check It First)](https://browser.lol/en/blog/testing-suspicious-links-without-risk)

  How to open a suspicious link safely: check it without clicking, scan it privately, open it in a disposable cloud browser, and what to do if you clicked.

  October 30, 2025
