Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 380

DNS Rebinding

Reviewed byCybersecurity entrepreneur & security researcher

What is DNS Rebinding?

DNS RebindingA browser-side attack that abuses short DNS TTLs to make a hostname resolve first to an attacker server, then to an internal IP, bypassing the same-origin policy.


In a DNS rebinding attack, the attacker controls an authoritative DNS server for a domain such as evil.example.com and answers with a very short TTL (often 1 second). A victim's browser first resolves the hostname to the attacker's public IP and loads JavaScript, satisfying the same-origin policy. Moments later the attacker's server rebinds the same name to an internal address like 192.168.1.1, 127.0.0.1, or a cloud metadata IP (169.254.169.254). Because the origin (scheme, host, port) is unchanged from the browser's point of view, the already-loaded JavaScript can now issue requests to the internal target's HTTP API, reading responses and triggering privileged actions on devices that assume any local caller is trusted.

The technique is old — it traces to the 1996 "Princeton attack" on Java — but it keeps resurfacing against unauthenticated local services. In January 2018, Google Project Zero's Tavis Ormandy showed that Blizzard's Update Agent ran a JSON-RPC server on localhost:1120 that never validated the Host header, so a rebound web page could drive privileged commands on the machines of tens of millions of gamers; he demonstrated the same class of flaw days earlier in the Transmission BitTorrent client. Smart-home hubs, developer tools, and router admin panels have all been reached this way. Rebinding is also a common pivot to SSRF-style theft of cloud credentials from the 169.254.169.254 metadata endpoint.

Defences work at the application and network layers: validate the Host/Origin header on every local service, require authentication even on localhost, pin responses to HTTPS (TLS certificates won't match the rebound IP), and have resolvers reject answers that map public names to RFC 1918, loopback, or metadata ranges ("DNS pinning" and private-IP filtering).

flowchart TD
  V[Victim browser] -->|1. visit evil.example.com| A[Attacker web server]
  A -->|2. serve JS, DNS TTL = 1s| V
  V -->|3. re-resolve evil.example.com| D[Attacker DNS server]
  D -->|4. rebind to 192.168.1.1<br/>or 169.254.169.254| V
  V -->|5. same-origin JS calls<br/>internal target| T[Router / metadata / IoT API]
  T -->|6. response read by attacker JS| A

● Examples

  1. 01

    A malicious ad rebinds evil.example.com to 192.168.1.1 and reads the victim's router admin page.

  2. 02

    An attacker reaches AWS instance metadata at 169.254.169.254 from a compromised in-browser session.

● Frequently asked questions

What is DNS Rebinding?

A browser-side attack that abuses short DNS TTLs to make a hostname resolve first to an attacker server, then to an internal IP, bypassing the same-origin policy. It belongs to the Network Security category of cybersecurity.

What does DNS Rebinding mean?

A browser-side attack that abuses short DNS TTLs to make a hostname resolve first to an attacker server, then to an internal IP, bypassing the same-origin policy.

How do you defend against DNS Rebinding?

Defences for DNS Rebinding typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for DNS Rebinding?

Common alternative names include: Browser DNS rebinding.

● Related terms