DNS glossary

What is DNS Rebinding?

Abstract isometric UI showing network ranges, usage bars, region names (EMEA/APAC), and a purple "Deploy" button
Key takeawaysKey takeaways are generated with AI assistance. Because automated summaries can occasionally contain errors or miss important context, always refer to the full blog post for complete information.

DNS rebinding is a security attack that exploits browser same-origin policy by abusing DNS responses to redirect victims' browsers from attacker-controlled public servers to internal private network devices. The attack works by serving JavaScript from a public address with a short TTL, then changing the DNS answer to a private address so the browser treats requests to internal services as originating from the same origin. Mitigation requires a layered approach including recursive resolver filtering to block public names resolving to private addresses, Host header validation on internal services, authentication mechanisms, and browser-level controls to restrict requests to private networks.

What is the core mechanism of a DNS rebinding attack and how does it bypass browser security?

DNS rebinding exploits the browser same-origin policy by keeping the hostname constant while changing the underlying IP address from public to private. An attacker controls a domain and its authoritative DNS server, first answering queries with their public server address using a very short TTL. After the TTL expires, the attacker’s server responds with a private address like an internal router or server. The browser treats both responses as the same origin because the hostname remains unchanged, allowing injected JavaScript to reach internal services that typically assume all local network traffic is trusted and require no authentication.

What are the primary defense mechanisms against DNS rebinding attacks?

Defense requires a layered approach combining multiple controls. Recursive resolvers should filter responses mapping external names to private address ranges, commonly called rebinding protection. Internal web services must validate the Host header and require authentication before exposing functionality. Browsers should implement controls restricting requests to private networks. Additionally, network administrators should configure exceptions carefully for internal domains that legitimately use private addresses. These controls address the attack at the resolver, browser, and target service levels to prevent exploitation.

Which devices and services are most vulnerable to DNS rebinding attacks?

Any device with a web interface reachable from the victim’s network that lacks Host header validation or authentication is vulnerable. Common targets include routers, printers, cameras, development servers, build tools, and management interfaces. Enterprise environments are equally exposed despite perimeter firewalls, since the malicious request originates from inside the network on a user’s own device. Internal dashboards and administrative interfaces that assume trusted network access without requiring authentication represent significant risk vectors for attackers seeking to read configurations or trigger unauthorized actions.

DNS rebinding at a glance

AttributeValue
CategoryDNS-based attack technique
Primary useBypassing the browser same-origin policy to reach internal services from a malicious web page
Protocol and portDNS, typically port 53, plus HTTP or HTTPS from the browser
OSI layerApplication layer
Related termsDNS, DNS cache poisoning, Time to live, Recursive resolver, DNS filtering, DNS security

How DNS rebinding works

The attacker controls a domain and its authoritative DNS server, and relies on the browser trusting the hostname rather than the IP address behind it. The same-origin policy compares origins by scheme, host and port, so a changed IP address does not change the origin.

  1. Victim visits the malicious site: The user loads a page from an attacker-controlled hostname. The attacker's authoritative server answers the DNS query with the address of a server the attacker runs, using a very short time to live.
  2. Script loads in the browser: The attacker's server returns a page containing JavaScript. The browser treats the script as belonging to the attacker's hostname origin.
  3. DNS answer changes: After the short TTL expires, the script makes another request to the same hostname. The attacker's DNS server now answers with a private address, such as a router or internal server.
  4. Browser reaches the internal target: The browser sends the request to the internal address, still considering it the same origin. The script can read the response.
  5. Data is returned to the attacker: The script sends what it read, or issues commands to the internal device, using the victim's browser as a proxy.

The attack depends on the resolver honoring the short TTL and on the internal service accepting requests with an unexpected Host header or no authentication. Defenses include resolvers that drop public answers containing private addresses, hosts that validate the Host header, and authentication on internal services.

Why DNS rebinding matters in enterprise networks

DNS rebinding turns a victim's browser into a bridge across the network perimeter. Firewalls normally block inbound connections from the internet, but the request here originates from inside the network, from a device the user already controls. Targets include routers, printers, cameras, development servers and other internal web interfaces that assume anything on the local network is trusted and often have no login.

The impact depends on what the internal service exposes. An attacker may read configuration data, change settings or trigger actions through an unauthenticated interface. Because the traffic looks like ordinary browser activity to the user's own machine, perimeter tools can miss it unless DNS responses are inspected.

Mitigation is layered. Recursive resolvers can filter responses that map external names to private address ranges, a feature commonly called rebinding protection. Internal services should check the Host header and require authentication, and browsers add controls such as restrictions on requests to private networks. Networks that skip these controls leave unauthenticated internal services reachable by any web page a user opens.

DNS rebinding vs DNS hijacking

DNS rebinding keeps DNS answers legitimate from the attacker's own server and exploits browser origin trust, while DNS hijacking alters the resolution path or records so users reach a destination the domain owner did not intend. What is DNS hijacking?

AttributeDNS rebindingDNS hijacking
Who controls the DNS answerThe attacker, through a domain they own and its authoritative serverThe attacker, after tampering with a resolver, router settings or a victim's records
Main targetInternal web services reached through the victim's browserUsers or traffic headed to a specific legitimate domain
MechanismShort TTL answers that change from a public to a private addressRedirecting queries or changing records to point to a malicious address
Browser same-origin policyBypassed because the hostname stays the sameNot the central issue

DNS rebinding vs DNS spoofing

DNS rebinding uses truthful answers from a server the attacker controls, while DNS spoofing forges or poisons answers that a resolver or client then accepts for a name the attacker does not control. What is DNS Spoofing?

AttributeDNS rebindingDNS spoofing
Authenticity of answersGenuine answers from the attacker's own authoritative serverForged or injected answers
DNSSEC effectDoes not stop it, since the attacker can sign their own zoneHelps detect forged answers for signed zones
GoalMake a browser send requests to internal hostsRedirect clients for a name to an attacker-chosen address

Common misconceptions about DNS rebinding

DNSSEC validates that answers came from the zone owner. In a rebinding attack the attacker is the zone owner, so signed answers pass validation and the attack still works.

TLS does not close the gap by itself. The attacker can obtain a valid certificate for their own hostname, and the real defense is the internal service checking the Host header and requiring authentication.

Enterprise networks are exposed as well. Internal dashboards, development servers, build tools and management interfaces that skip authentication on the assumption of a trusted network can be reached through a user's browser.

Perimeter firewalls see the request as coming from an internal workstation, so they allow it. Controls need to sit in the resolver, the browser or the target service.

Low TTLs are common for legitimate load balancing and failover, so blocking them outright causes false positives. A more reliable signal is a public name that suddenly resolves to a private or loopback address.

See how unified DDI simplifies network operations

Manage DNS, DHCP and IP addresses from one platform with automation, visibility and control built in.

DNS rebinding FAQ

Related terms

Article

Time to Live (TTL)

TTL (time to live) is a setting for each DNS record that specifies how long a resolver caches the DNS query before it expires.

Learn more
Article

RFC 1918 networks

RFC 1918 networks are ranges of IP addresses designated for private use on TCP/IP networks.

Learn more
Article

Response Policy Zone (RPZ)

RPZ (Response Policy Zone) is a DNS zone that allows resolvers to rewrite answers to block, redirect, or log queries to risky or disallowed domains, providing administrators real-time security and policy control.

Learn more
Article

DNS Filtering

DNS filtering controls access to websites and online resources by allowing or blocking DNS queries based on predefined security policies and threat intelligence.

Learn more
Article

DNS hijacking

DNS hijacking occurs when an attacker changes the IP addresses of a domain's DNS servers to attacker-controlled servers.

Learn more
Article

DNS Spoofing

DNS spoofing is an attack in which falsified DNS information redirects users from legitimate destinations to malicious or unintended IP addresses.

Learn more
Article

DNSSEC (Domain Name Service Security Extension)

DNSSEC (Domain Name Service Security Extension) is a mechanism that uses cryptography to authenticate DNS data and verify the integrity of DNS queries and responses.

Learn more
Article

Split-Horizon DNS

Split-horizon DNS provides different DNS responses to internal and external users based on their location or network, helping organizations manage access to resources.

Learn more