Skip to content
Info disclosure Write-up Intermediate

Live Demo

Safari on iOS 15 with iCloud Private Relay does not proxy WebRTC STUN requests, so a website can use JavaScript to collect ICE candidates and extract the user's real IP address. This defeats the purpose of Private Relay, which is meant to hide the user's IP address from websites.

fingerprintjs.com

Published on fingerprintjs.com

Online privacy is a hot topic of debate these days. Internet users don’t like being tracked online; on the other hand, advertisers need to glean user behavior insights to display the most relevant (and profitable) ads.

The author, on fingerprintjs.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, Safari does not route WebRTC STUN requests through iCloud Private Relay, and it exposes ICE candidates containing the real IP address to JavaScript.

Impact

A website could learn the user's real IP address, defeating the anonymity that iCloud Private Relay is supposed to provide; the leak only occurs on iOS 15 and was fixed in a macOS beta.

What the attacker needed

IOS 15 device; iCloud+ subscription; Private Relay enabled; Safari browser

The fix

Apple should update Safari so that STUN requests are also routed through iCloud Private Relay; the issue was reported to Apple.

How it was found

  1. Create a peer connection object with a STUN server.
  2. Subscribe to the icecandidate event to receive ICE candidates.
  3. Filter for STUN candidates and parse their IP addresses.
  4. Create a data channel and an offer to start collecting ICE candidates.
  5. Wait for the final null candidate and read the collected IPs.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

iCloud Private Relay is a privacy feature that hides your real IP address from websites by sending your traffic through Apple's proxies. However, Safari also uses a technology called WebRTC for direct browser-to-browser connections, and it does not send those connection requests through the proxy. A website can therefore run a script that asks a STUN server (a helper that tells you your public IP) for your address and then read your real IP from the response.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.