Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-9050: Improper Control of Generation of Code ('Code Injection')

0
High
VulnerabilityCVE-2024-9050cvecve-2024-9050
Published: Tue Oct 22 2024 (10/22/2024, 12:14:31 UTC)
Source: CVE Database V5

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.

AI-Powered Analysis

AILast updated: 10/04/2025, 10:31:38 UTC

Technical Analysis

CVE-2024-9050 is a high-severity vulnerability affecting the libreswan client plugin for NetworkManager, specifically the NetworkManager-libreswan component. The vulnerability arises from improper sanitization of VPN configuration input provided by local unprivileged users. The configuration format is key-value based, but the plugin fails to properly escape special characters, causing the application to misinterpret values as keys. A critical parameter involved is the 'leftupdown' key, which accepts an executable command as its value. This command is used as a callback by NetworkManager-libreswan to retrieve configuration settings and is executed with elevated privileges. Because NetworkManager leverages Polkit to allow unprivileged users to control network configurations, a malicious local user can exploit this flaw by crafting a malicious VPN configuration that injects arbitrary commands via the 'leftupdown' key. This leads to local privilege escalation and potential arbitrary code execution with root privileges on the affected system. The vulnerability has a CVSS 3.1 score of 7.8, reflecting its high impact on confidentiality, integrity, and availability, with low attack complexity and requiring only local privileges without user interaction. No known exploits are currently reported in the wild, but the nature of the flaw makes it a significant risk for systems using NetworkManager-libreswan, especially on Linux distributions where this VPN client plugin is deployed.

Potential Impact

For European organizations, this vulnerability poses a serious risk primarily to Linux-based systems that use NetworkManager with the libreswan plugin for VPN connectivity. Successful exploitation results in local privilege escalation to root, enabling attackers to fully compromise affected machines. This can lead to unauthorized access to sensitive data, disruption of network services, and the potential for lateral movement within corporate networks. Organizations relying on VPNs for secure remote access or site-to-site connectivity may face increased risk if attackers gain root access through this vulnerability. Given that many European enterprises and public sector entities use Linux-based infrastructure and NetworkManager for network management, the impact could be widespread. Additionally, the ability to execute arbitrary code as root could facilitate installation of persistent backdoors, data exfiltration, or sabotage of critical systems, affecting confidentiality, integrity, and availability of organizational assets.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should take the following specific actions: 1) Immediately audit systems running NetworkManager with the libreswan plugin to identify vulnerable versions. 2) Apply vendor patches or updates as soon as they become available; if no official patch exists yet, consider temporarily disabling the libreswan plugin or restricting its usage to trusted users only. 3) Implement strict access controls on who can configure VPN settings locally, limiting it to trusted administrators to reduce the risk of malicious configuration injection. 4) Monitor system logs and network configuration changes for suspicious activity related to VPN configurations, especially any unusual use of the 'leftupdown' parameter or unexpected command executions. 5) Employ application whitelisting or mandatory access control (e.g., SELinux, AppArmor) to restrict execution of unauthorized commands triggered by NetworkManager. 6) Educate local users about the risks of unauthorized VPN configuration changes and enforce policies to prevent unprivileged users from modifying network settings. 7) Consider deploying endpoint detection and response (EDR) solutions that can detect anomalous privilege escalation or code execution behaviors on Linux endpoints.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2024-09-20T18:25:24.574Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68e0f3c3b66c7f7acdd3e9d3

Added to database: 10/4/2025, 10:15:31 AM

Last enriched: 10/4/2025, 10:31:38 AM

Last updated: 10/16/2025, 3:15:20 PM

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats