In order to establish a peer-to-peer connection, WebRTC implementations use Interactive Connectivity Establishment (ICE) [
RFC 8445]. ICE attempts to discover multiple IP addresses using techniques such as Session Traversal Utilities for NAT (STUN) [
RFC 5389] and Traversal Using Relays around NAT (TURN) [
RFC 5766] and then checks the connectivity of each local-address-remote-address pair in order to select the best one. The addresses that are collected usually consist of an endpoint's private physical or virtual addresses and its public Internet addresses.
These addresses are provided to the web application so that they can be communicated to the remote endpoint for its checks. This allows the application to learn more about the local network configuration than it would from a typical HTTP scenario, in which the web server would only see a single public Internet address, i.e., the address from which the HTTP request was sent.
The additional information revealed falls into three categories:
-
If the client is multihomed, additional public IP addresses for the client can be learned. In particular, if the client tries to hide its physical location through a Virtual Private Network (VPN), and the VPN and local OS support routing over multiple interfaces (a "split-tunnel" VPN), WebRTC can discover not only the public address for the VPN, but also the ISP public address over which the VPN is running.
-
If the client is behind a Network Address Translator (NAT), the client's private IP addresses, often [RFC 1918] addresses, can be learned.
-
If the client is behind a proxy (a client-configured "classical application proxy", as defined in RFC 1919, Section 3), but direct access to the Internet is permitted, WebRTC's STUN checks will bypass the proxy and reveal the public IP address of the client. This concern also applies to the "enterprise TURN server" scenario described in RFC 7478, Section 2.3.5.1 if, as above, direct Internet access is permitted. However, when the term "proxy" is used in this document, it is always in reference to an [RFC 1919] proxy server.
Of these three concerns, the first is the most significant, because for some users, the purpose of using a VPN is for anonymity. However, different VPN users will have different needs, and some VPN users (e.g., corporate VPN users) may in fact prefer WebRTC to send media traffic directly -- i.e., not through the VPN.
The second concern is less significant but valid nonetheless. The core issue is that web applications can learn about addresses that are not exposed to the Internet; typically, these address are IPv4, but they can also be IPv6, as in the case of NAT64 [
RFC 6146]. While disclosure of the [
RFC 4941] IPv6 addresses recommended by [
RFC 8835] is fairly benign due to their intentionally short lifetimes, IPv4 addresses present some challenges. Although private IPv4 addresses often contain minimal entropy (e.g., 192.168.0.2, a fairly common address), in the worst case, they can contain 24 bits of entropy with an indefinite lifetime. As such, they can be a fairly significant fingerprinting surface. In addition, intranet web sites can be attacked more easily when their IPv4 address range is externally known.
Private IP addresses can also act as an identifier that allows web applications running in isolated browsing contexts (e.g., normal and private browsing) to learn that they are running on the same device. This could allow the application sessions to be correlated, defeating some of the privacy protections provided by isolation. It should be noted that private addresses are just one potential mechanism for this correlation and this is an area for further study.
The third concern is the least common, as proxy administrators can already control this behavior through organizational firewall policy, and generally, forcing WebRTC traffic through a proxy server will have negative effects on both the proxy and media quality.
Note also that these concerns predate WebRTC; Adobe Flash Player has provided similar functionality since the introduction of Real-Time Media Flow Protocol (RTMFP) support [
RFC 7016] in 2008.