Linux client - Lack of certificate validation leading to RCE
The Linux client failed to validate TLS certificates when connecting to a WireGuard-related API and also had a command injection flaw. An attacker able to perform a man-in-the-middle attack could combine these to execute code on the victim's machine.
CyberGhost
Originally disclosed on Bugcrowd
- Accepted in 6 days
- Fixed in 18 days
- Disclosed after 4 months
Summary by CyberGhost
While mmmdspl initially submitted this vulnerability through our Vulnerability Disclosure Program, we immediately recognized the value of his research into our application and wanted to ensure he was rewarded for it so we asked him to submit to our bug bounty program. We greatly appreciate his efforts to identify this remote code execution weakness in our Linux client application.
Summary by mmmdspl
Linux client has two bugs: lack of certificate validation while connecting to wireguard-related API and command injection. Together, successful man-in-the-middle attack can result in code execution on a machine connecting to wireguard.
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 client disabled TLS certificate verification and then used untrusted data from the API response in a shell command without sanitisation.
Impact
A successful man-in-the-middle attack could result in code execution on a machine connecting to WireGuard.
What the attacker needed
Attacker can intercept network traffic; victim uses the Linux client
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.
When a program connects to a server over HTTPS, it should check that the server's certificate is genuine. This client skipped that check, so someone who can intercept the network traffic could pretend to be the server. The client also passed data from that server into a system command without cleaning it, so the fake server could make the victim's computer run harmful commands.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.