CVE-2024-9050 Networkmanager-libreswan: local privilege escalation via leftupdown
Local attackers can escalate privileges to root by injecting commands into the leftupdown parameter of the NetworkManager libreswan plugin configuration.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-9050?
CVE-2024-9050 is a high-severity command injection vulnerability in Red Hat Enterprise Linux 10, published on 22 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
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.
Weakness: CWE-94
Which versions are affected by CVE-2024-9050?
Linux distribution packages (40)
NetworkManager-libreswan AlmaLinux:8 | All versions | 1.2.10-7.el8_10 |
NetworkManager-libreswan-gnome AlmaLinux:8 | All versions | 1.2.10-7.el8_10 |
NetworkManager-libreswan AlmaLinux:9 | All versions | 1.2.22-4.el9_5 |
NetworkManager-libreswan-gnome AlmaLinux:9 | All versions | 1.2.22-4.el9_5 |
NetworkManager-libreswan Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.10-7.el8_10 |
NetworkManager-libreswan-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.10-7.el8_10 |
NetworkManager-libreswan-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.10-7.el8_10 |
NetworkManager-libreswan-gnome Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.10-7.el8_10 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:1.2.10-7.el8_10 |
NetworkManager-libreswan Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.22-4.el9_5 |
NetworkManager-libreswan-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.22-4.el9_5 |
NetworkManager-libreswan-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.22-4.el9_5 |
NetworkManager-libreswan-gnome Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.22-4.el9_5 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:1.2.22-4.el9_5 |
NetworkManager-libreswan Red Hat:rhel_aus:7.7::server | All versions | 0:1.2.4-4.el7_7 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_aus:7.7::server | All versions | 0:1.2.4-4.el7_7 |
NetworkManager-libreswan-gnome Red Hat:rhel_aus:7.7::server | All versions | 0:1.2.4-4.el7_7 |
NetworkManager-libreswan Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.2.10-6.el8_2 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.2.10-6.el8_2 |
NetworkManager-libreswan-debugsource Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.2.10-6.el8_2 |
NetworkManager-libreswan-gnome Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.2.10-6.el8_2 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:rhel_aus:8.2::appstream | All versions | 0:1.2.10-6.el8_2 |
NetworkManager-libreswan Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-debugsource Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-gnome Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:rhel_aus:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan Red Hat:rhel_aus:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_aus:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-debugsource Red Hat:rhel_aus:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-gnome Red Hat:rhel_aus:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:rhel_aus:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan Red Hat:rhel_e4s:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_e4s:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-debugsource Red Hat:rhel_e4s:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-gnome Red Hat:rhel_e4s:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan-gnome-debuginfo Red Hat:rhel_e4s:8.4::appstream | All versions | 0:1.2.10-6.el8_4 |
NetworkManager-libreswan Red Hat:rhel_e4s:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-debuginfo Red Hat:rhel_e4s:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
NetworkManager-libreswan-debugsource Red Hat:rhel_e4s:8.6::appstream | All versions | 0:1.2.10-6.el8_6 |
How do I fix CVE-2024-9050?
Apply the vendor's patch.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-9050 being exploited?
There is no known exploitation of CVE-2024-9050 in the wild and no public exploit code.
Sources
Also known as ALSA-2024:8353, ALSA-2024:9555, CLSA-2025-1763419211, MGASA-2024-0356, OESA-2024-2331, RHSA-2024:8312 and 13 more.