CVE-2024-9050: Improper Control of Generation of Code ('Code Injection')
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 Analysis
Technical Summary
The vulnerability in NetworkManager-libreswan stems from improper sanitization of VPN configuration data provided by local unprivileged users. The configuration uses a key-value format, but special characters are not escaped, causing the application to misinterpret values as keys. The 'leftupdown' key, which specifies an executable command callback, can be exploited by a malicious user to execute arbitrary code with root privileges via NetworkManager's use of Polkit for network configuration control. This leads to local privilege escalation and potential full system compromise. Red Hat has published multiple advisories with patches for affected versions, primarily for Red Hat Enterprise Linux 7.7 and 9.0 variants.
Potential Impact
Successful exploitation allows a local unprivileged user to escalate privileges to root by injecting malicious commands through the VPN configuration. This results in full system compromise with high confidentiality, integrity, and availability impact. The CVSS v3.1 base score is 7.8 (High), reflecting the ease of exploitation with low attack complexity and no user interaction required.
Mitigation Recommendations
Red Hat has released official security updates addressing CVE-2024-9050 for NetworkManager-libreswan on affected Red Hat Enterprise Linux versions (notably 7.7 and 9.0). Users should apply these updates promptly following Red Hat's guidance at https://access.redhat.com/articles/11258. No alternative mitigations or workarounds are specified in the advisories. Patch status is confirmed as official-fix via Red Hat advisories.
CVE-2024-9050: Improper Control of Generation of Code ('Code Injection')
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.
CVSS v3.1
Score 7.8high
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in NetworkManager-libreswan stems from improper sanitization of VPN configuration data provided by local unprivileged users. The configuration uses a key-value format, but special characters are not escaped, causing the application to misinterpret values as keys. The 'leftupdown' key, which specifies an executable command callback, can be exploited by a malicious user to execute arbitrary code with root privileges via NetworkManager's use of Polkit for network configuration control. This leads to local privilege escalation and potential full system compromise. Red Hat has published multiple advisories with patches for affected versions, primarily for Red Hat Enterprise Linux 7.7 and 9.0 variants.
Potential Impact
Successful exploitation allows a local unprivileged user to escalate privileges to root by injecting malicious commands through the VPN configuration. This results in full system compromise with high confidentiality, integrity, and availability impact. The CVSS v3.1 base score is 7.8 (High), reflecting the ease of exploitation with low attack complexity and no user interaction required.
Mitigation Recommendations
Red Hat has released official security updates addressing CVE-2024-9050 for NetworkManager-libreswan on affected Red Hat Enterprise Linux versions (notably 7.7 and 9.0). Users should apply these updates promptly following Red Hat's guidance at https://access.redhat.com/articles/11258. No alternative mitigations or workarounds are specified in the advisories. Patch status is confirmed as official-fix via Red Hat advisories.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2024-09-20T18:25:24.574Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/errata/RHSA-2024:8312","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8338","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8352","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8353","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8354","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8355","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8356","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8357","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:8358","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:9555","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2024:9556","vendor":"Red Hat"},{"url":"https://access.redhat.com/security/cve/CVE-2024-9050","vendor":"Red Hat"}]
Threat ID: 68e0f3c3b66c7f7acdd3e9d3
Added to database: 10/04/2025, 10:15:31 UTC
Last enriched: 06/26/2026, 12:26:35 UTC
Last updated: 09/10/2026, 19:36:49 UTC
Views: 79
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.