WebRTC Leak With a VPN: How It Can Expose Your IP
On this page
Summary: A WebRTC leak happens when a web page uses the browser’s real-time communication features to learn an IP address that your VPN was supposed to keep out of view. The VPN tunnel itself usually hasn’t failed. Instead, the browser is collecting network addresses for possible direct connections, and part of that process can travel outside the tunnel or report addresses from outside it. In current desktop browsers, the older problem of exposing your local network address is largely masked. Your ISP-assigned public IP can still surface, though, when WebRTC traffic doesn’t go through the VPN, most often with split-tunnel setups and proxy-style browser VPNs. What surfaces is an address, not your name, your accounts, or your browsing history.
VPN Advisors is an independent, affiliate-supported website that explains how VPNs work, what they protect, and how to evaluate VPN services. This article explains how WebRTC can reveal IP addresses through browser connections, when a VPN may not prevent that exposure, and what browser-level protections can change. For a broader look at VPN leaks and protection features, see our VPN Protection Features guide.
What “WebRTC leak” means
WebRTC is the set of browser technologies behind in-browser video calls, voice chat, and direct file transfers. To connect two devices directly, the browser runs a process called Interactive Connectivity Establishment (ICE), defined in RFC 8445. ICE gathers “candidates”: IP address and port combinations that the other side might be able to reach.
The privacy issue comes from where those candidates go. The IETF’s RFC 8828 explains that the gathered addresses are provided to the web application so it can pass them to the remote endpoint. It contrasts this with ordinary web traffic, where a web server would only see a single public address. In other words, WebRTC can give a page a wider view of your network addresses than a normal page load does.
A page doesn’t need to start a call or ask for your camera to begin this gathering. A data-only connection created in script is enough, a point raised in Mozilla’s bug tracker as far back as 2014.
Not every candidate type matters equally when you use a VPN:
| Candidate type | What address it carries | Why it matters during VPN use |
|---|---|---|
| Host | An address assigned to one of the device’s own network interfaces, such as Wi-Fi, Ethernet, or a VPN’s virtual interface | This was the classic source of exposed private network addresses. Current desktop browsers usually replace it with a random .local name (see below). |
| Server-reflexive | The public address a STUN server saw when the browser’s request reached it | This is the main VPN concern. Its value depends entirely on the route the request took. |
| Relayed | An address on a TURN relay server used by the application | It points to the relay, not to your own network. |
How WebRTC can sidestep a VPN
To find a server-reflexive candidate, the browser sends a small request to a public STUN server that essentially asks, “What address do you see me coming from?” If that request travels through the VPN tunnel, the answer is the VPN’s exit address, the same one websites already see, and nothing has leaked. Exposure happens when the request reaches the internet by another route, or when the browser lists addresses that sit outside the tunnel.
Split tunneling and multi-interface gathering
RFC 8828 calls the VPN case the most significant of the address-exposure concerns it lists. With a split-tunnel VPN, where the VPN and the operating system allow routing over more than one interface, WebRTC can discover both the VPN’s public address and the ISP public address the VPN runs over. Browser engineers made the same point in a 2015 W3C presentation, noting the problem should only arise with split VPNs.
Browser policy decides how many routes WebRTC tries. Chromium’s source code describes its default as letting WebRTC enumerate all interfaces to discover public ones, while stricter policies limit WebRTC to the default route used by normal web traffic. Microsoft’s Edge policy documentation likewise describes the default as using all available network interfaces. When a browser tries every interface and the VPN leaves the physical connection usable, a STUN request has a path outside the tunnel.
Proxy-style VPNs in the browser
Some products called VPNs, including many browser extensions and built-in browser features, route web traffic through a proxy rather than tunneling everything at the system level. RFC 8828 notes that when a client is behind a proxy but direct internet access is still allowed, WebRTC’s STUN checks bypass the proxy and reveal the client’s public IP address.
A 2026 example shows this is not only historical. A Mozilla bug report about Firefox 149’s built-in VPN, described in the thread as a browser-level proxy, said WebRTC’s UDP-based STUN requests could expose the user’s real public IP. A Mozilla maintainer responded that the fix had shipped in Firefox 150, and the report was closed as a duplicate of an issue tracked as CVE-2026-6782.
What a page is likely to see
The following simplified comparison shows which public address STUN can report as a server-reflexive candidate. It does not cover every host or relay candidate. Actual outcomes still depend on the browser, its settings, and the platform.
| Setup | Where the STUN request travels | Public address reported by STUN |
|---|---|---|
| System VPN routing all traffic through the tunnel | Through the tunnel | The VPN’s exit IP |
| Split-tunnel VPN, browser using all interfaces | Through the tunnel and over the physical connection | The VPN’s exit IP and the ISP-assigned IP |
| Proxy-style browser VPN that doesn’t handle WebRTC’s UDP traffic | Directly over the regular connection | The ISP-assigned IP |
Some VPN apps advertise “WebRTC leak protection.” How that works differs from one provider to another, so the label describes that provider’s claim rather than a standard behavior shared across VPNs. A WebRTC test showing an IP address is not, on its own, proof of a leak: check whether it belongs to your ISP, the VPN exit, or a TURN relay.
What current browsers changed
Many explanations of WebRTC leaks were written when browsers routinely handed private network addresses, such as 192.168.1.20, to any page that asked. That behavior has largely changed on desktop.
In 2019, the Chrome team announced that private IP addresses in host candidates would be replaced with random mDNS hostnames ending in .local. The technique is described in an IETF draft, and a W3C working-group discussion reports that Chrome, Edge, Firefox, and Safari use mDNS hostnames in host candidates. A page sees a random name instead of your local address.
That protection has limits, and they explain why results vary from one setup to another:
- Camera and microphone permission. In the same announcement, the Chrome team said that if a peer connection has audio or video capture permission, IP addresses are returned in host candidates. RFC 8828 permits gathering all addresses only with user consent and suggests tying that consent to camera and microphone permission.
- Platform differences. The Chrome team noted in 2019 that the mDNS stack wasn’t built into Chrome on Android, so plain IPs would still be sent there. A 2025 preprint measurement study, which has not been peer reviewed, reported local and carrier-grade NAT addresses from Chrome and Firefox on Android, while desktop Firefox exposed none in its tests.
- Public addresses are not masked. mDNS replaces host addresses only. Under the IETF draft, the server-reflexive candidate still carries an IP address, because sharing a public address is the purpose of that candidate. That is why the VPN-relevant form of the problem, a public IP learned through an unexpected route, survives in current browsers.
Who can see the address and what it reveals
WebRTC exposure is narrower than “the internet can see your IP.” Code running on the page can receive the gathered candidates and share them with a remote peer. STUN and TURN servers see the source address of requests they handle, not the browser’s entire candidate list. Other websites, and anyone not involved in that WebRTC session, don’t receive the candidates.
What the exposed address reveals depends on its type:
- A private network address (such as 192.168.x.x) is shared by countless home networks. The Chrome team acknowledged that private IP addresses do not uniquely identify browser users, though they may still be used for tracking.
- An ISP-assigned public address is the address your VPN was meant to replace. RFC 8828 frames VPN use as an attempt to hide physical location, and this address undoes that for the page that collects it. It identifies a network connection, not a person. It doesn’t tell the page your name, which accounts you use, or what else you browse.
- The VPN’s own exit address appearing in WebRTC results is expected behavior, not a leak.
How WebRTC exposure differs from other VPN leaks
WebRTC exposure is often grouped with other leak types, but each has a different source and a different observer:
| Issue | What is exposed | Who typically sees it | Where it originates |
|---|---|---|---|
| WebRTC exposure | IP addresses gathered as connection candidates | The page running WebRTC code and a remote peer; STUN/TURN servers see source addresses | Browser or application candidate gathering and routing |
| DNS leak | The domain names you look up | A DNS resolver outside the VPN | System or application DNS handling |
| IPv6 leak | IPv6 traffic and your IPv6 address | Sites reached over IPv6 | IPv6 traffic not covered by the VPN |
| VPN connection failure | Traffic routed outside the VPN; HTTPS content remains encrypted | Local network and ISP; directly reached sites | Tunnel failure without effective traffic blocking |
| Normal VPN exit IP | The VPN server’s address | Every site you visit | Intended VPN behavior |
The categories can overlap. RFC 8828 notes that WebRTC can expose IPv6 addresses as well, so a WebRTC result that shows an IPv6 address may point to an underlying IPv6 routing gap rather than a WebRTC-specific problem. Likewise, if the VPN connection has dropped and traffic falls back to the regular connection, WebRTC can report your real address because the tunnel is no longer carrying that traffic. A WebRTC leak in the narrow sense is the case where the VPN is working for normal browsing, yet the browser’s connection-gathering process still surfaces an address from outside it.