Vulnerability · Published Oct 22, 2024 · Assigned by redhat
CVE-2024-9050Networkmanager-libreswan: local privilege escalation via leftupdown
High 7.8
In plain English
A high-severity code injection in NetworkManager-libreswan. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 40% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
A flaw was found in the libreswan client plugin for NetworkManager (NetkworkManager-libreswan), where it fails to properly sanitize the VPN configuration from the local unprivileged user. In this configuration, composed by a key-value format, 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | NetworkManager-libreswan | 1.2.10-7.el8_10 | ALSA-2024:8353 |
| AlmaLinux:9 | NetworkManager-libreswan | 1.2.22-4.el9_5 | ALSA-2024:9555 |
| AlmaLinux:8 | NetworkManager-libreswan-gnome | 1.2.10-7.el8_10 | ALSA-2024:8353 |
| AlmaLinux:9 | NetworkManager-libreswan-gnome | 1.2.22-4.el9_5 | ALSA-2024:9555 |
| Rocky Linux:8 | NetworkManager-libreswan | 0:1.2.10-7.el8_10 | RLSA-2024:8353 |
| Rocky Linux:9 | NetworkManager-libreswan | 0:1.2.22-4.el9_5 | RLSA-2024:9555 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- RHSA-2024:8312 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8338 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8352 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8353 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8354 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8355 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8356 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8357 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:8358 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:9555 vendor-advisory, x_refsource_REDHAT
- RHSA-2024:9556 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-9050 vdb-entry, x_refsource_REDHAT
- RHBZ#2313828 issue-tracking, x_refsource_REDHAT
- https://gitlab.gnome.org/GNOME/NetworkManager-libreswan/-/commit/dcf8acfb25bd31e4b8cbd20c229da660238b5c1b
- https://www.openwall.com/lists/oss-security/2024/10/25/1
- http://www.openwall.com/lists/oss-security/2024/10/25/1