[Android] [Critical] Per-app split tunneling bypass for AmneziaWG 2.0 allows blacklisted apps to see the ip address of the VPN.

Author: R4L34Created Apr 9, 2026Updated Sep 30, 2026

Summary It was mentioned in the previous commit but the person responsible for fixing it did it only for XRay so I feel obligated to mention it again. You can get the ip of the VPN server by explicitly going through the tun0 interface. Like this (in Termux). curl -s https://ifconfig.me/ip --interface tun0 That will allow any spyware (which now includes every russian big-tech app) to not only get the fact that you use a VPN but also get the ip address of the server. Then they can log it, and later block it.

Environment

  • App version: 4.8.14.5
  • Android version: 14
  • Device: Samsung Galaxy A33 5G
  • Protocol used: AmneziaWG 2.0
  • Split tunneling: Enabled (Termux excluded from VPN)

To Reproduce Steps to reproduce the behavior:

  1. Install AmneziaVPN and configure a working connection.
  2. Enable Per-app VPN (split tunneling) and exclude Termux (or any test app with INTERNET permission).
  3. Connect to the VPN.
  4. In Termux, run:
bash
#Send traffic through the tun0 interface
curl -s https://ifconfig.me/ip --interface tun0
# Observed: VPN exit IP`

Expected behavior Applications excluded from VPN routing should not be able to send traffic through the VPN tunnel via a localhost proxy, unless this behavior is explicitly documented and user-controlled. If a local listener is required for internal purposes, access should be restricted to the app's own components.

Security Impact If the proxy accepts unauthenticated connections and forwards traffic through the VPN tunnel:

  • User-configured per-app routing policies can be bypassed by any app with INTERNET permission.

  • Traffic that the user explicitly intended to route directly may leak through the VPN (or vice versa).

  • The presence of an open, unauthenticated localhost proxy may serve as a detectable signal of VPN usage to monitoring applications.

Operational relevance In environments where applications or platforms monitor network behavior for signs of VPN usage, this issue may increase the detectability of VPN use. Because an app excluded from VPN routing can still access the VPN tunnel via localhost, it can both infer that the VPN is active and send probe traffic through the tunnel. This may also aid enumeration of VPN egress IPs and contribute to blocking of VPN endpoints. This consideration is particularly relevant given recent reports of app-level VPN detection guidelines being distributed to IT platforms [1][2].

Suggested Mitigations The same that solved SOCKS5 leak (will be solved if someone merges this pull request).

  • Require authentication (username/password) for the tun0 interface, if the feature is intended for external use.
  • If there is any alternative way to get the VPN ip address without being in the split-tunneling whitelist - fix it.

I repeat that this vulnerability while not as critical poses a significant threat to the VPN's hosted on private servers which were mostly immune to the direct ip blocking from Russian censors.

Source: amnezia-vpn/amnezia-client