Skip to content
Info disclosure Write-up Advanced

TunnelCrack, a combination of two widespread security vulnerabilities in VPNs

VPN clients add routing exceptions so that traffic to the local network and to the VPN server's IP address bypasses the tunnel. An attacker acting as a malicious Wi-Fi network or ISP can abuse these exceptions to make the victim send arbitrary traffic outside the VPN, letting the attacker read or intercept it.

tunnelcrack.mathyvanhoef.com

Published on tunnelcrack.mathyvanhoef.com

8 August 2023 — This website presents TunnelCrack, a combination of two widespread security vulnerabilities in VPNs. Although a VPN is supposed to protect all data that a user transmits, our attacks can bypass the protection of a VPN.

The author, on tunnelcrack.mathyvanhoef.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

VPN clients add routing exceptions for local-network traffic and for the VPN server's IP address without validating that the local network uses private addresses or that the server address is genuine, so an attacker can steer arbitrary destinations into those exceptions.

Impact

An attacker could read and intercept the victim's traffic, learn which websites they visit, and use the loss of VPN protection as a basis to attack older insecure protocols; HTTPS with HSTS limits theft of data but not the disclosure of visited sites.

What the attacker needed

Victim connects to attacker's Wi-Fi; ServerIP variant: ability to spoof DNS replies; ServerIP variant: visibility of traffic to VPN server

The fix

VPN clients were updated to send all traffic through the tunnel except traffic generated by the VPN app itself, and local network access should be disabled when the local network uses public IP addresses.

How it was found

  1. Set up a malicious Wi-Fi network, for example by cloning a popular hotspot name, and get the victim to connect to it.
  2. Assign the victim a public IP address and subnet so that the target website's address appears to be on the local network.
  3. Have the victim visit the target site; the request goes outside the VPN tunnel and can be intercepted.
  4. For the ServerIP variant, spoof the DNS reply for the VPN server's hostname so it resolves to the address you want to leak traffic towards.
  5. Redirect the victim's connection to the real VPN server so the tunnel still comes up, while a routing rule now sends traffic to that address outside the tunnel.
  6. When the victim visits the target site, the request is sent unprotected and can be read.

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.

A VPN is meant to wrap all of a device's internet traffic in an encrypted tunnel. These researchers found that VPN apps deliberately let some traffic skip the tunnel, namely traffic to the local network and traffic to the VPN server itself, and an attacker on the same Wi-Fi can trick the device into treating ordinary websites as if they were local or as if they were the VPN server. That makes the device send that traffic unprotected, so the attacker can watch it.

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.