[GH-ISSUE #3259] Security: tunnel config incl. PrivateKey is readable by any local user via the AmneziaWG service command line (Windows) #1509

Open
opened 2026-10-13 20:44:00 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @gleb00735 on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3259

Version: AmneziaVPN 5.0.3.0 (AmneziaWG 2.0.1), Windows 10 22H2

Description
When an AmneziaWG tunnel is started, the Windows service AmneziaWGTunnel$AmneziaVPN is registered with the whole tunnel config embedded in its ImagePath:

"C:/Program Files/AmneziaVPN/AmneziaVPN-service.exe" tunneldaemon "[Interface] PrivateKey = ... HeaderProtectionKey = ... "

Service configuration is readable by non-admin local users (e.g. sc qc "AmneziaWGTunnel$AmneziaVPN", the service key under HKLM\SYSTEM\CurrentControlSet\Services, or WMI Win32_Service.PathName). As a result, the client's PrivateKey and HeaderProtectionKey are exposed to any local account and can easily leak into diagnostics, logs or screenshots.

Steps to reproduce

  1. Connect with an AmneziaWG profile.
  2. From a standard (non-admin) account run: sc qc "AmneziaWGTunnel$AmneziaVPN"
  3. The full config, including keys, is printed.

Expected behavior
Pass the config to the tunnel service through a file with restricted ACLs (SYSTEM/Administrators only) that is deleted after the tunnel is up, or via a named pipe/IPC, instead of the command line. Official WireGuard for Windows keeps configs in protected storage and only passes a path.

Impact
Local information disclosure only (low-to-medium). The key belongs to a single client profile and can be rotated, but on multi-user machines any user can read it and impersonate the profile.

Originally created by @gleb00735 on GitHub (Oct 4, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3259 **Version:** AmneziaVPN 5.0.3.0 (AmneziaWG 2.0.1), Windows 10 22H2 **Description** When an AmneziaWG tunnel is started, the Windows service `AmneziaWGTunnel$AmneziaVPN` is registered with the whole tunnel config embedded in its ImagePath: `"C:/Program Files/AmneziaVPN/AmneziaVPN-service.exe" tunneldaemon "[Interface] PrivateKey = ... HeaderProtectionKey = ... "` Service configuration is readable by non-admin local users (e.g. `sc qc "AmneziaWGTunnel$AmneziaVPN"`, the service key under HKLM\SYSTEM\CurrentControlSet\Services, or WMI Win32_Service.PathName). As a result, the client's PrivateKey and HeaderProtectionKey are exposed to any local account and can easily leak into diagnostics, logs or screenshots. **Steps to reproduce** 1. Connect with an AmneziaWG profile. 2. From a standard (non-admin) account run: `sc qc "AmneziaWGTunnel$AmneziaVPN"` 3. The full config, including keys, is printed. **Expected behavior** Pass the config to the tunnel service through a file with restricted ACLs (SYSTEM/Administrators only) that is deleted after the tunnel is up, or via a named pipe/IPC, instead of the command line. Official WireGuard for Windows keeps configs in protected storage and only passes a path. **Impact** Local information disclosure only (low-to-medium). The key belongs to a single client profile and can be rotated, but on multi-user machines any user can read it and impersonate the profile.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1509
No description provided.