Skip to main content
Vulnerability Database/CVE-2026-91840

CVE-2026-91840: NetworkManager-vpnc Privilege Escalation

CVE-2026-91840 is a privilege escalation flaw in NetworkManager-vpnc that allows local unprivileged users to gain root access through VPN username injection. This post explains technical details, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-91840 Overview

CVE-2026-91840 is a local privilege escalation flaw in NetworkManager-vpnc, the GNOME NetworkManager plugin for the vpnc IPsec VPN client. The vulnerability stems from improper neutralization of newline characters in the VPN username field [CWE-93]. A local unprivileged user can inject a newline into the username, append arbitrary vpnc configuration directives, and execute a program of their choosing as root when the VPN connection is activated.

Critical Impact

Local unprivileged users can escalate to root by crafting a malicious VPN connection profile that abuses CRLF injection in the username field to inject arbitrary vpnc directives.

Affected Products

  • NetworkManager-vpnc (GNOME NetworkManager VPN plugin for vpnc)
  • Linux distributions shipping NetworkManager-vpnc, including Red Hat Enterprise Linux
  • Desktop environments that expose NetworkManager VPN configuration to unprivileged users

Discovery Timeline

  • 2026-09-25 - CVE-2026-91840 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-91840

Vulnerability Analysis

NetworkManager-vpnc translates connection settings stored by NetworkManager into a configuration file consumed by the vpnc daemon. The plugin writes the VPN username as a Xauth username directive followed by a newline. When the username string itself contains an embedded newline (\n) character, the parser treats the trailing content as additional configuration directives rather than part of the username value.

The vpnc configuration format supports directives that control how the client runs, including hooks for executing helper scripts. By injecting a crafted directive after the newline, a local attacker influences the arguments that NetworkManager passes to vpnc when the connection is brought up. Because NetworkManager runs the VPN helper as root, the injected program executes with root privileges.

Exploitation requires only the ability to create or modify a NetworkManager VPN connection profile, a capability granted to desktop users on most Linux distributions through Polkit.

Root Cause

The root cause is CRLF Injection [CWE-93]. The plugin fails to validate or escape newline characters before writing user-controlled fields into the vpnc configuration file. Any field that is embedded verbatim and terminated by a newline becomes a vector for injecting additional directives.

Attack Vector

The attack is local and requires low privileges with no user interaction. An attacker with an interactive session creates a VPN connection where the username field contains a newline followed by a vpnc directive that references an attacker-controlled binary or script. Activating the connection causes NetworkManager to invoke vpnc with the attacker's directive in effect, executing the referenced program as root.

For technical details, refer to the Red Hat CVE-2026-91840 Advisory and the GNOME NetworkManager-vpnc Work Item.

Detection Methods for CVE-2026-91840

Indicators of Compromise

  • NetworkManager connection profiles under /etc/NetworkManager/system-connections/ containing VPN username values with embedded newline (\n) or carriage return characters.
  • Unexpected child processes spawned by nm-vpnc-service or vpnc running as root and executing binaries from user-writable paths such as /tmp, /home, or /var/tmp.
  • Audit log entries showing root-level execve calls originating from the NetworkManager VPN helper shortly after a VPN activation event by an unprivileged user.

Detection Strategies

  • Parse NetworkManager keyfile connection profiles and flag any user, Xauth username, or related fields containing control characters outside the printable ASCII range.
  • Monitor D-Bus method calls to org.freedesktop.NetworkManager for ActivateConnection requests tied to VPN profiles created or modified by non-administrative users.
  • Correlate Polkit authorization decisions for org.freedesktop.NetworkManager.settings.modify.own with subsequent root process creation from the vpnc service.

Monitoring Recommendations

  • Enable Linux audit rules on /etc/NetworkManager/system-connections/ and the vpnc configuration directory to capture write events and the responsible UID.
  • Alert on root processes whose parent chain includes NetworkManager or nm-vpnc-service but whose executable path is user-controlled.
  • Collect VPN activation events and child process telemetry into a central data lake for retrospective hunting across the fleet.

How to Mitigate CVE-2026-91840

Immediate Actions Required

  • Apply the NetworkManager-vpnc update from your Linux distribution as soon as it is published; track vendor status through the Red Hat CVE-2026-91840 Advisory.
  • Audit existing NetworkManager VPN connection profiles for suspicious control characters in username, group name, or other string fields and remove any that cannot be attributed to a legitimate administrator.
  • Review Polkit rules that allow unprivileged users to create or modify system VPN connections and tighten them to require administrator authentication where feasible.

Patch Information

At the time of publication, the upstream fix is tracked in the GNOME NetworkManager-vpnc Work Item and the Red Hat Bug Report #2533642. Distribution-specific package updates should be installed through the standard package manager once available.

Workarounds

  • Restrict the org.freedesktop.NetworkManager.settings.modify.system and modify.own Polkit actions to administrative users via a custom Polkit rule in /etc/polkit-1/rules.d/.
  • Remove or disable the NetworkManager-vpnc plugin on systems that do not require vpnc-based IPsec VPNs until a patched package is installed.
  • Enforce input validation at the management layer by scripting pre-commit checks on /etc/NetworkManager/system-connections/ to reject profiles containing newline characters in string fields.
bash
# Example Polkit rule restricting NetworkManager connection modification to wheel members
# /etc/polkit-1/rules.d/10-networkmanager-vpn.rules
polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.freedesktop.NetworkManager.settings.modify") == 0) {
        if (!subject.isInGroup("wheel")) {
            return polkit.Result.AUTH_ADMIN;
        }
    }
});

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.