PAC-D007 · wpad-dns-discovery

PAC distributed via WPAD DNS discovery

medium · Delivery (HTTP headers) · Top 20 #10

WPAD clients look up wpad through the DNS suffix search list, and Windows also tries parent domains (DNS devolution). If no internal record answers, a wpad name outside your organisation can supply the PAC. Own the name, block wpad queries beyond your zones, prefer explicit configuration.

Why it matters

What the WPAD draft says, and what clients really do

The 1999 WPAD draft (draft-ietf-wrec-wpad-01, expired, never an RFC) tells a client to walk up its own domain one label at a time: a client in pc.eng.corp.example would ask for wpad.eng.corp.example, then wpad.corp.example, then wpad.example. This step-by-step shortening is called the DNS walk. Its last steps ask for names your organisation may not own.

Current browsers do not do that walk themselves. They ask the operating system for the single name wpad and fetch http://wpad/wpad.dat. The operating system’s resolver then appends the DNS suffixes it is configured with, and on Windows that can include parent domains (DNS devolution). So the walk has moved from the browser into the resolver; it has not gone away.

ClientDHCP option 252Name it looks upWho adds domain suffixesSource
Chrome, Edge (Chromium)first, Windows onlywpad, URL http://wpad/wpad.datthe operating system resolver; Chromium deliberately does no devolution of its ownChromium pac_file_decider.cc
Firefoxfirst, Windows only (since Firefox 63), pref network.proxy.enable_wpad_over_dhcpwpad, URL http://wpad/wpad.datthe operating system resolver; the source states that Firefox does not walk the FQDNFirefox nsPACMan.cpp, Mozilla bug 356831
Windows (WinHTTP, the system auto-detect setting)firstwpad through the Windows DNS client; without a suffix search list also wpad.local (multicast DNS), NetBIOS and LLMNRthe primary DNS suffix, the connection’s own suffix and, with devolution, parent domains; or only the suffix search list if one is configuredMicrosoft: WinHTTP AutoProxy, DNS devolution; lab 2026-10-11
macOSdocumented for MDM proxy mode “Automatic”an A record wpadnot documented by AppleApple Platform Deployment

Firefox runs its own WPAD only in the mode “Auto-detect proxy settings for this network”. In its default mode “Use system proxy settings” it ignores the system’s auto-detect flag unless network.proxy.system_wpad is set to true.

Where Windows DNS devolution stops

Devolution is a feature of the Windows DNS client: a single-label name such as wpad is tried with the primary DNS suffix and then with its parent domains, by every application that asks the resolver, browsers included. Before Windows 7 and Windows Server 2008 R2 (and before the update in Microsoft Security Advisory 971888) it continued until only two labels were left. A client with the primary suffix pc.eng.corp.example would therefore ask for wpad.eng.corp.example, then wpad.corp.example. For a company domain directly under a two-label public suffix (the kind of country suffix the UK uses for companies), “two labels left” is the public suffix itself, so the last query asked for wpad under that public suffix: a name outside every company. Since then the default stops at the forest root domain of Active Directory; devolution is off when a global suffix search list is configured, when the forest root is single-labelled, or when the primary suffix does not end with the forest root. The Group Policy settings “Primary DNS Suffix Devolution” and “Primary DNS Suffix Devolution Level” are under Computer Configuration > Administrative Templates > Network > DNS Client.

Windows also asks the local network

In the lab on Windows 11 (2026-10-11), with no suffix search list configured, Windows asked DNS for wpad under the primary DNS suffix and then under the connection’s own suffix. When neither name existed, it went on to ask the local network for wpad: by multicast DNS (wpad.local), by NetBIOS and by LLMNR, three name services that any machine on the same network segment can answer. With a suffix search list configured, Windows asked only for wpad under each suffix in the list, in the list’s order, and the local-network queries did not appear.

Why it still matters

A suffix in the search list, or a parent domain reached by devolution, may not be yours. Internal suffixes that clash with new public top-level domains send wpad queries to the internet, where someone else can register the name and hand out a PAC file; the 2016 US-CERT alert TA16-144A on WPAD name collision documents this. The discovery URL is also always plain http (PAC-D001), so anyone on the path can replace the file.

Mitigations: make sure every internal suffix has an authoritative wpad record (or an explicit NXDOMAIN via RPZ), block wpad.* resolution to the internet at the resolver, check the devolution level and the suffix search list, switch off LLMNR and NetBIOS name resolution where they are not needed, and distribute the PAC URL explicitly through GPO/MDM so that discovery is not needed at all. The page Web proxy auto-detection shows how to switch discovery off per client.

How to fix

Distribute the PAC URL explicitly (GPO/MDM); block wpad.* queries beyond your own zones at the resolver; disable WPAD where it is not needed.

Examples

Bad

# discovered via WPAD
http://wpad.corp.example/wpad.dat
Open bad example in checker

Good

# explicit AutoConfigURL from GPO/MDM; WPAD disabled
https://pac.corp.example/proxy.pac
Open good example in checker

Engine behaviour

EngineBehaviourSource
chromiumLooks up only the single name wpad (http://wpad/wpad.dat) and lets the operating system apply the DNS suffix search paths; no devolution of its own. DHCP option 252 is tried first, on Windows only.code, verified 2026-10-10 · ref
firefoxLooks up only the single name wpad (http://wpad/wpad.dat); the source states that it does not walk the host's FQDN because the list of TLDs is incomplete. DHCP option 252 first, Windows only.code, verified 2026-10-10 · ref
winhttpWithout a suffix search list: wpad under the primary DNS suffix, then under the connection's own suffix, then wpad.local by multicast DNS, WPAD by NetBIOS and wpad by LLMNR. With a suffix search list: wpad under each listed suffix in order, and no multicast, NetBIOS or LLMNR queries. No DHCP packet was seen during these detection runs.lab, verified 2026-10-11

Source: code = read in the engine's source, doc = vendor documentation, lab = observed in a lab run, expert = practitioner knowledge, not yet verified.

Related rules

References

Last updated: