What is HTML smuggling?

HTML smuggling is an attack technique that assembles a malicious payload inside the victim’s browser using JavaScript, instead of downloading it from the network. Inspection tools see only harmless-looking fragments in transit; the finished malware materializes on the endpoint without any gateway, proxy or sandbox ever observing a malicious file. It is a signature technique of highly evasive (HEAT) attacks.

Also known as: HTML smuggling attack · smuggled payload · browser-assembled malware

How the technique works

The attacker delivers an ordinary-looking page or email attachment containing JavaScript and encoded data fragments. In the browser, the script decodes and concatenates the fragments into a file — an executable, an ISO, a weaponized document — and triggers a local save, often via a legitimate browser download API. Every network control inspected legitimate-looking HTML and JavaScript; the malicious artifact never crossed the wire as a file.

What stops it

Detection-side answers (smarter sandboxing, script analysis) chase an unbounded space of obfuscation. The architectural answer is to move the assembly somewhere harmless: with remote browser isolation, the JavaScript runs — and the payload assembles — inside a disposable cloud container, and downloads reach the user only after Content Disarm and Reconstruction rebuilds them clean. The technique still executes; it just executes where it cannot hurt anyone.

// In the Cyberdis portfolio

Menlo Security executes smuggled payloads where they cannot hurt anyone — distributed by Cyberdis.

// FAQ

Common questions.

Why do secure web gateways miss HTML smuggling?

Because there is no malicious file in transit to inspect — only fragments and script. The payload exists for the first time on the endpoint, after every network inspection point has already passed the traffic as clean.

Is HTML smuggling common?

It is a staple of modern phishing and initial-access campaigns, popularized by criminal and state actors alike, precisely because it defeats the default enterprise stack of gateway plus email filter plus antivirus.

Does browser isolation fully neutralize it?

The assembly happens inside the isolated container rather than on the device, and any resulting file is rebuilt clean by CDR before delivery. The attack completes harmlessly — which is the isolation model’s core advantage over detection.

Related explainers: What are highly evasive adaptive threats (HEAT)?What is remote browser isolation?What is Content Disarm and Reconstruction (CDR)?

Weighing approaches? Browser isolation vs secure web gateway: what actually stops web threats?