# 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.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **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:** Yes
- **Published:** 22 Oct 2024
- **Updated:** 25 Jun 2026
- **Also known as:** ALSA-2024:8353, ALSA-2024:9555, CLSA-2025-1763419211, MGASA-2024-0356, OESA-2024-2331, RHSA-2024:8312, RHSA-2024:8338, RHSA-2024:8352, RHSA-2024:8353, RHSA-2024:8354, RHSA-2024:8355, RHSA-2024:8356, RHSA-2024:8357, RHSA-2024:8358, RHSA-2024:9555, RHSA-2024:9556, RLSA-2024:8353, RLSA-2024:9555, openSUSE-SU-2024:14422-1

## 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 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2024-9050?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `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.

## Is CVE-2024-9050 being exploited?

There is no known exploitation of CVE-2024-9050 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-9050 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2024-9050 in the wild and no public exploit code.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-9050/ (Markdown: https://insights.sbomify.com/CVE-2024-9050/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-9050
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-9050
- OSV: https://osv.dev/vulnerability/CVE-2024-9050

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-9050/
Summaries are generated and may contain mistakes; the official description above is the record.
