Cybersecurity glossary

What is Malvertising?

Learn what malvertising is, how hostile ads on real publishers infect or phish visitors, how redirect chains evade detection, and which publisher and browser controls reduce the risk.

Social engineering and user threatsUpdated August 13, 2026
Also known asMalicious advertisingMalvertisementHostile ad injection

Definition

Malvertising is the use of online advertising networks to deliver malware, exploit kits, or phishing content through ads that appear on otherwise legitimate websites, so visitors are attacked by the ad slot rather than by a compromise of the publisher’s own pages.

Why the ad slot is a privileged script on someone else’s site

Publishers sell attention. Advertising networks deliver HTML, JavaScript, and iframes into that attention. Malvertising is what happens when that delivery path is used as malware distribution or phishing, while the surrounding article remains genuine. Users trust the domain in the address bar. The hostile code arrives from a chain of exchanges, resellers, and creatives the user never agreed to audit.

That split of trust is the point. Email phishing has to impersonate a brand. Malvertising borrows a brand the user already chose, then abuses the one rectangle on the page that is designed to run untrusted content.

Modern campaigns mix silent exploit attempts with loud social engineering: fake system alerts, counterfeit software updates, and prize pages. Either way, the publisher may be a victim too.

How a malvertising chain typically runs

1

Buy or hijack inventory

Purchase ads, compromise a reseller account, or inject code into a creative that already has approval.

2

Fingerprint the browser

Check OS, plugins, language, and sometimes corporate IP so only profitable or vulnerable clients see the bad branch.

3

Bounce through redirects

Chain tracking domains so scanners and brand-safety tools see a clean first hop.

4

Launch the payload

Open an exploit kit, a drive-by download, a phishing clone, or a full-screen scare page.

5

Monetize quickly

Install stealers, push a fake support call, or harvest credentials before the creative is taken down.

6

Rotate and repeat

Burned domains and creatives are cheap. The next impression can look like a different advertiser.

Payloads that ride inside ads

Silent client exploits

The iframe loads an exploit kit aimed at an unpatched browser, codec, or plugin with no obvious ad to click.

Fake updates and cleaners

A banner or takeover insists the video player or antivirus must be reinstalled from this button.

Scareware and tech support

A fullscreen infection-detected page locks the tab and displays a phone number staffed by the attacker.

Credential and payment skims

Lookalike prize, shipping, or login flows collect passwords and cards under a publisher the user already trusted.

Malvertising versus site compromise

PathPublisher CMSWhat the user sees
MalvertisingOften untouchedA real article plus a hostile ad or overlay
Watering-hole CMS hackTemplates or plugins alteredThe site origin itself serves the script
Direct phishingNot involvedA lure that sends them off-site on purpose
Drive-by on any of the aboveVariesLittle extra consent beyond visiting or clicking once

Controls for readers, employers, and publishers

  • Keep browsers auto-updated; malvertising exploit kits farm known bugs, not only zero-days.
  • On high-risk workstations, isolate browsing or limit third-party ad JavaScript rather than relying on users to recognize a fake update.
  • Never install software offered by an in-page popup, including required codecs on a site you already trust.
  • If a tab becomes a fake virus alert, close it from the browser’s task manager or another desktop control—do not click inside the page.
  • Publishers: sandbox ad iframes, constrain first-party CSP, and inventory every tag as if it had production credentials.
  • Use ads.txt and restrict resellers so unauthorized parties cannot sell your inventory into unknown chains.
  • Monitor for unexpected outbound script hosts and full-page redirects that begin in ad frames.
  • Incident response should capture the creative URL and redirect chain; the publisher homepage hash may be clean.

Brand safety is not the same as exploit safety

An ad can pass a family-friendly check and still load an exploit. Security teams should not outsource this risk to marketing’s viewability reports. If untrusted JavaScript can run next to a session cookie for your product, the advertising stack is part of the application threat model.

The practical takeaway

Malvertising attacks the rectangle that websites intentionally fill with other people’s code. The article can be honest; the impression can still be an exploit kit, a scare page, or a credential trap.

Patch the browser, treat unexpected in-page installers as hostile, and sandbox ads on properties you run. Users do not fail because they visited a real news site. They fail because the ad network was allowed to behave like an unreviewed supply chain.

Related security terms

Frequently asked questions

What is malvertising in simple terms?

Malvertising is a bad ad on a good website. You visit a real news or shopping site, and the advertisement—not the article—tries to infect your device or send you to a fake login.

Does malvertising mean the website itself was hacked?

Not necessarily. Publishers often load ads from third-party networks. Attackers buy inventory, compromise a reseller, or inject a redirect into the creative so the site owner never edited their CMS.

Do I have to click the ad?

Sometimes yes (fake update, codec, or prize buttons). Sometimes no: a hidden iframe or automatic redirect can start a drive-by exploit as soon as the ad renders.

Why is malvertising hard to block?

Creatives rotate quickly, go through long redirect chains, and are targeted by geography or cookie. Security scanners that fetched the ad an hour earlier may have seen a benign banner.

Are ad blockers a security control?

They reduce exposure to untrusted ad JavaScript, which is why many security teams allow them on high-risk workstations. They are not a complete control and can break publisher revenue and some site features.

What should publishers do?

Use reputable exchanges, ads.txt, sandboxed iframes, strict CSP for first-party pages, and monitoring for unexpected script hosts. Treat the ad tag as production code you do not fully control.

Is a ‘you have a virus’ popup always malvertising?

It is a common malvertising social-engineering payload. Close the tab from outside the popup if needed, and never call the number or install the cleaner it offers.

References

Explore authoritative guidance and frameworks related to malvertising.

Explore every security definition

Return to the glossary to search by term, alias, starting letter, or security category.

Browse glossary