Unknown · Networkmanager-Libreswan · CVE-2024-9050
**Name of the Vulnerable Software and Affected Versions**
NetworkManager-libreswan versions prior to 1.2.24
**Description**
A flaw was found in the libreswan client plugin for NetworkManager, where it fails to properly sanitize the VPN configuration from the local unprivileged user. The plugin fails to escape special characters, leading the application to interpret values as keys. One of the most critical parameters that could be abused by a malicious user is the `leftupdown` key. This key takes an executable command as a value and is used to specify what executes as a callback in NetworkManager-libreswan to retrieve configuration settings back to NetworkManager. As NetworkManager uses Polkit to allow an unprivileged user to control the system's network configuration, a malicious actor could achieve local privilege escalation and potential code execution as root in the targeted machine by creating a malicious configuration.
**Recommendations**
For versions prior to 1.2.24, update to version 1.2.24 or later to resolve the issue. As a temporary workaround, consider restricting access to the `leftupdown` key to minimize the risk of exploitation. Avoid using the `leftupdown` key in the affected VPN configuration until the issue is resolved.