WebRTC Leaks: Three Disclosures and One Deliberate Default
Privacy
Our own card calls it a leak. The requirements deciding what a page may be handed call it the recommended default, and define two stricter settings that were deliberately not made the starting point. Which of the four you are on decides what that word is worth.
Candidate routes are gathered before anything connects
A page speaking only HTTP learns one thing about where you sit, which is the address its request arrived from. Setting up live audio or video needs more than that, and the machinery it uses to find the options was never built to be discreet.
The requirements covering this were published in January 2021, on the standards track, and the most valuable thing in them is a decision they declined to take. They do not stop the gathering. What they do instead is sort the exposure, define four settings for it, and say which applies when nobody has been asked.
Collection finishes before any connection exists. Working out a direct path means assembling candidate routes and trying them in pairs, and what gets collected is “an endpoint’s private physical or virtual addresses and its public Internet addresses”. Those values reach the web application because the remote machine needs them, and the point is made without alarm: “This allows the application to learn more about the local network configuration than it would from a typical HTTP scenario”.
What that adds up to is sorted rather than condemned. “The additional information revealed falls into three categories”, and the first covers a machine reachable by more than one path. Where traffic hides behind a tunnel while the operating system still routes over several interfaces at once, “WebRTC can discover not only the public address for the VPN, but also the ISP public address over which the VPN is running”. Routing part of the traffic through a tunnel while the rest leaves directly is the arrangement that deliberately keeps two paths open.
Both remaining categories are graded lower. Where a translation sits between a machine and the wider internet, the local numbering behind it can be learned too. Given a configured relay that still permits direct departure, the connectivity trials go around it. The ranking is explicit: “Of these three concerns, the first is the most significant, because for some users, the purpose of using a VPN is for anonymity”.
Four settings exist and the loosest requires permission
Four behaviours are then defined, ordered by how much each gives away.
Trying everything is what the loosest does, and it admits the cost. The first requires every interface to be tried when contacting the helper servers or the far machine itself, and the verdict on it is self-aware: “This will converge on the best media path and is ideal when media performance is the highest priority, but it discloses the most information”. It is also gated, because “Mode 1 MUST NOT be used unless user consent has been provided”.
Almost every machine sits on the second. Here “WebRTC MUST follow the kernel routing table rules”, so media leaves by the route the ordinary requests take and the outward-facing figure a page collects is normally the figure it already had. What gets added is local, because once an interface is settled on, the values tied to it “MUST be discovered and provided to the application as host candidates”. Comparing a result against the ordinary visible figure is therefore worth doing on the page whose opening line names four of the nine fields it can fill.
Withholding the local values is what the third does. It matches the second “except that the associated private addresses MUST NOT be provided”, at a stated price: “This may cause traffic to hairpin through a NAT, fall back to an application TURN server, or fail altogether”.
Media goes wherever everything else already goes, under the fourth. Where a configured relay cannot carry the usual transport, the connection falls back to one that can: “Use of TCP will result in reduced media quality”. Absent any grant, “In cases where user consent has not been obtained, Mode 2 SHOULD be used”.
Why the strict option was not made the starting point
Here is the decision worth reading twice, because it explains the situation better than any account of software settings does. The document knows the local values could be withheld by default. It says so, and then declines to require it.
Being able to withhold the local values is required, and withholding them by default is not. “It should be possible to configure WebRTC to not disclose private local IP addresses”, which puts the third setting beyond argument as something that must be available. Then comes the sentence that matters: “This document does not require this to be the default state, as there is no currently defined mechanism that can satisfy this requirement as well as the aforementioned requirement to allow direct peer-to-peer connections.”
Treat that as an engineering limit rather than an excuse. Two things were wanted at once. Pages should not learn your local numbering, and two machines able to reach each other directly should be allowed to, without routing everything via an intermediary. In January 2021 nobody had a method delivering both, so the second was kept and the first was made optional.
Trade rather than fix is the framing throughout. The stated aim was a set of behaviours “each with a different balance between performance and privacy”, and the alternative was ruled out early, on the grounds that “blunt solutions that disable WebRTC or make it significantly harder to use are undesirable”.
Permanence was never claimed for any of it. Builders are told that “implementations MAY choose stricter modes if desired”, and the authors leave their own recommendation open to replacement.
A local figure can outlast the session that revealed it
The second concern is graded lower than the first, yet it keeps paying out, because the core issue is that “web applications can learn about addresses that are not exposed to the Internet”.
Some of those values are nearly worthless and some are not. Common ones carry almost nothing, while “in the worst case, they can contain 24 bits of entropy with an indefinite lifetime”, from which it follows that “they can be a fairly significant fingerprinting surface”. Why every household may reuse the same numbering belongs to the blocks that carry no meaning outside one network.
Nothing about the sharpest use of such a value concerns where you are. It is a tie between two sessions meant to stay apart: “Private IP addresses can also act as an identifier that allows web applications running in isolated browsing contexts” to learn that they sit on one machine, and the result is stated outright, that this “could allow the application sessions to be correlated, defeating some of the privacy protections provided by isolation”. A separate session clears storage and reaches no further, so what a steady local value threatens is the separation that two sessions on one machine can defeat.
Hedging follows immediately, and the hedge is worth keeping. Having named the mechanism, the authors add that “private addresses are just one potential mechanism for this correlation and this is an area for further study”. So it is raised as a concern with no measurement behind it.
Composition decides this and a total cannot
Which brings the question back to a reading, and to what a reading can settle on its own.
Totals tell you less than the breakdown does. Our own result card ends on a figure for how many candidate routes were seen, sitting underneath rows that each name what they are. That total is the least informative thing on it, because the advice to anybody building on this is to look for a kind rather than a number, “by checking for the presence of host candidates”. The rule given is short, and it works as a diagnosis: “If no host candidates are present, Mode 3 or 4 is in use; this knowledge can be useful for diagnostic purposes”. Read that way the local rows stop being the finding and become the evidence of which setting is in force, which is the reason to look twice at the row reporting a bare total beside the labelled ones.
Staleness sets in for a reason that goes unnoticed. Our other privacy reading closes by listing what should prompt you to take it again, naming a different server, a different piece of software and a different connection. None is the change that matters most here. Consent is what moves a machine onto the setting trying every interface, the manner of asking is left to whoever builds the software, and permission granted once for something unrelated is not a change those three triggers would catch. The list is right as far as it goes and one trigger short, in the reading that lists what should prompt a repeat.
Neither reading names which of the four settings produced the result. That is the value the specification defines and the one no card here currently reports.
Three categories of exposure, four settings, with one of the four recommended for when nobody has been asked. The local values a page collects are handed over deliberately, because withholding them would have cost the direct connection and in January 2021 no method existed that kept both. So read a result showing local numbering as a report on which setting your software applies, and read one showing an outward-facing figure you did not expect as the concern the authors graded highest.