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

Machine-generated threat intelligence

AILast updated: 02/27/2026, 16:36:04 UTC

Technical Analysis

CVE-2024-9050 is a vulnerability discovered in the libreswan client plugin for NetworkManager, known as NetworkManager-libreswan. The vulnerability stems from improper control over the generation of code due to insufficient sanitization of VPN configuration inputs provided by local unprivileged users. The configuration format uses key-value pairs, but the plugin fails to escape special characters properly, causing values to be misinterpreted as keys. The critical parameter involved is 'leftupdown', which accepts an executable command as its value and is used as a callback mechanism to retrieve configuration settings back to NetworkManager. Because NetworkManager leverages Polkit to allow unprivileged users to manage network configurations, this flaw enables a local attacker to inject malicious commands via the 'leftupdown' parameter. When processed, these commands execute with root privileges, resulting in local privilege escalation and potential full system compromise. The vulnerability has a CVSS v3.1 score of 7.8, indicating high severity, with attack vector local, low attack complexity, requiring low privileges, no user interaction, and impacting confidentiality, integrity, and availability. No public exploits are currently known, but the vulnerability poses a significant risk in environments where NetworkManager-libreswan is deployed and local user access is possible.

Potential Impact

The impact of CVE-2024-9050 is substantial for organizations using NetworkManager-libreswan on Linux systems. A local unprivileged user can exploit this vulnerability to escalate privileges to root, gaining full control over the affected system. This can lead to unauthorized access to sensitive data, modification or destruction of system files, installation of persistent malware, and disruption of network services. The vulnerability undermines the security boundary between unprivileged and privileged users, potentially allowing attackers to bypass security controls and compromise system integrity and availability. In multi-user environments such as shared servers, enterprise workstations, or cloud instances, this flaw could be leveraged by malicious insiders or attackers who have gained limited local access. The ability to execute arbitrary code as root also increases the risk of lateral movement within networks and the deployment of further attacks. Although exploitation requires local access, the widespread use of NetworkManager and libreswan in enterprise and government Linux deployments makes this a critical concern globally.

Mitigation Recommendations

To mitigate CVE-2024-9050, organizations should immediately apply any available patches or updates from NetworkManager-libreswan maintainers once released. Until patches are available, restrict local user access to systems running NetworkManager-libreswan, especially limiting the ability to modify VPN configurations. Implement strict file system permissions on configuration directories and files to prevent unauthorized edits. Review and harden Polkit policies to minimize unprivileged users' capabilities to control network configurations. Employ monitoring and alerting for unusual modifications to VPN configuration files or unexpected executions of the 'leftupdown' script. Consider disabling or restricting the use of the 'leftupdown' parameter if feasible. Conduct regular audits of local user accounts and their privileges to reduce the risk of insider threats. Finally, educate system administrators and users about the risks of local privilege escalation vulnerabilities and the importance of applying security updates promptly.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to 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: 2/27/2026, 4:36:04 PM

Last updated: 3/25/2026, 3:00:41 AM

Views: 43

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 more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses