OpenVPN Flaw: RCE Bug Allows Command Injection via DNS Parameters
A vulnerability has been discovered in early builds of OpenVPN, allowing attackers to execute arbitrary commands on a user’s machine. The flaw affects versions from 2.7_alpha1 through 2.7_beta1 and poses a serious threat to POSIX-based systems, including Linux, macOS, and BSD platforms.
The issue arises from improper handling of the –dns and –dhcp-option parameters, which are passed unsanitized to the –dns-updown script. When connecting to an untrusted VPN server, this flaw enables the injection of commands executed with elevated privileges on the client system. Such exploitation could result in data theft, malware installation, or complete system compromise.
The vulnerability has been assigned CVE-2025-10680 with a CVSS score of 8.1. It can be exploited remotely and requires no authentication. The attack leverages the inherent trust relationship between clients and servers, particularly regarding DNS configuration parameters. On affected Unix-like systems, the –dns-updown script executes received values directly, creating a pathway for arbitrary command injection.
Potential exploitation scenarios include the use of DNS strings containing shell metacharacters—such as backticks or semicolons—that allow additional commands to be embedded and executed. Researchers warn that users deploying these beta versions for remote access or corporate VPNs face elevated risk, especially when connecting to external or lesser-known VPN providers.
Although the primary impact targets Linux and macOS, Windows systems may also be vulnerable when using integrated PowerShell scripting. Fortunately, there have been no reports of active exploitation so far.
The OpenVPN team has swiftly released version 2.7_beta2, which introduces input sanitization for DNS parameters, effectively eliminating the injection vector. The update also includes enhancements for Windows, such as improved event logging via openvpnservmsg.dll, and restores IPv4 translation functionality on Linux. Additional fixes address issues with multi-socket connections and DHCP option handling in TAP mode.
Developers strongly advise users to upgrade to the new release or revert to the stable 2.6.x branch until the final 2.7 version is issued. This incident once again underscores the critical importance of rigorously testing beta VPN software, particularly in heterogeneous system environments where a single overlooked flaw can have far-reaching consequences.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.