/

CVE-2026-111224

Severity:

HIGH RISK

(7.5)

OS Command Injection (CWE-78) in pfSense OpenVPN Script

CVE-2026-111224

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Root-level command execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

pfSense CE through 2.9.0 contains an operating system command injection flaw in the OpenVPN connection script. An authenticated VPN user may be able to execute commands with root privileges by supplying a crafted username when the connection or disconnection workflow processes it.

pfSense CE through 2.9.0 contains an operating system command injection flaw in the OpenVPN connection script. An authenticated VPN user may be able to execute commands with root privileges by supplying a crafted username when the connection or disconnection workflow processes it.

Affected context

The vulnerability occurs in pfSense CE deployments that use the affected OpenVPN connection workflow with authenticated users supplied through RADIUS or LDAP. Risk arises when a username containing shell-sensitive characters is incorporated into an eval-processed firewall anchor command during VPN connection or disconnection handling.

The vulnerability occurs in pfSense CE deployments that use the affected OpenVPN connection workflow with authenticated users supplied through RADIUS or LDAP. Risk arises when a username containing shell-sensitive characters is incorporated into an eval-processed firewall anchor command during VPN connection or disconnection handling.

Exploit preconditions

  • Attack surface: The OpenVPN connection and disconnection handling scripts
  • Required access: Valid authentication as a VPN user through a configured identity provider such as RADIUS or LDAP
  • Trigger point: Processing of the authenticated username during OpenVPN session setup or teardown
  • Why exploitation is possible: User-controlled username data reaches shell evaluation without sufficient neutralization, allowing command syntax to escape its intended argument context
  • Attack surface: The OpenVPN connection and disconnection handling scripts
  • Required access: Valid authentication as a VPN user through a configured identity provider such as RADIUS or LDAP
  • Trigger point: Processing of the authenticated username during OpenVPN session setup or teardown
  • Why exploitation is possible: User-controlled username data reaches shell evaluation without sufficient neutralization, allowing command syntax to escape its intended argument context

Why this happens

The underlying bug is OS command injection caused by placing attacker-influenced username data into a shell command that is evaluated dynamically. Shell metacharacters and quoting constructs can alter the intended command structure when input is not treated strictly as data. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

The underlying bug is OS command injection caused by placing attacker-influenced username data into a shell command that is evaluated dynamically. Shell metacharacters and quoting constructs can alter the intended command structure when input is not treated strictly as data. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An authenticated VPN user could execute arbitrary commands as root
  • The firewall appliance could be fully compromised
  • Network traffic controls and firewall policies could be modified
  • Credentials, configuration data, or connected network resources could be exposed
  • The compromised system could be used for persistence or lateral movement
  • An authenticated VPN user could execute arbitrary commands as root
  • The firewall appliance could be fully compromised
  • Network traffic controls and firewall policies could be modified
  • Credentials, configuration data, or connected network resources could be exposed
  • The compromised system could be used for persistence or lateral movement

General mitigation guidance

Mitigation generally focuses on removing shell interpretation of identity data and reducing the privileges available to connection hooks.

Common defensive patterns include:

  • Replacing dynamically evaluated shell commands with direct argument-based process invocation
  • Treating usernames and other identity-provider attributes as untrusted input
  • Applying strict allowlists for permitted username formats where compatible with deployment requirements
  • Avoiding eval and equivalent string-to-command execution mechanisms
  • Running VPN hooks with the minimum privileges required and isolating administrative operations
  • Applying centralized identity-provider policies that restrict unsafe account-name characters

Mitigation generally focuses on removing shell interpretation of identity data and reducing the privileges available to connection hooks.

Common defensive patterns include:

  • Replacing dynamically evaluated shell commands with direct argument-based process invocation
  • Treating usernames and other identity-provider attributes as untrusted input
  • Applying strict allowlists for permitted username formats where compatible with deployment requirements
  • Avoiding eval and equivalent string-to-command execution mechanisms
  • Running VPN hooks with the minimum privileges required and isolating administrative operations
  • Applying centralized identity-provider policies that restrict unsafe account-name characters

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying eval, shell expansion, and concatenation of user-controlled values into commands
  • Code review checks for usernames, group names, or directory attributes entering privileged scripts
  • Runtime monitoring for unexpected root processes or command activity spawned by OpenVPN hooks
  • Audit correlation between VPN authentication events and unusual firewall or system changes
  • Policy enforcement that restricts unsafe identity attributes and requires shell-safe process invocation

Detection approaches may include:

  • Static analysis rules identifying eval, shell expansion, and concatenation of user-controlled values into commands
  • Code review checks for usernames, group names, or directory attributes entering privileged scripts
  • Runtime monitoring for unexpected root processes or command activity spawned by OpenVPN hooks
  • Audit correlation between VPN authentication events and unusual firewall or system changes
  • Policy enforcement that restricts unsafe identity attributes and requires shell-safe process invocation

Sources

SourceLink
abraxaslabs.techabraxaslabs.tech/research/pfsense-ce-leftovers
github.comgithub.com/abraxas/pfsense-ovpn-connect-eval
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/usr/local/sbin/openvpn.connect_async.sh#L83-L114
vulncheck.comvulncheck.com/advisories/netgate-pfsense-ce-through-2.9.0-os-command-injection-via-openvpn-connect-async-sh

Frequently asked

questions

It can be triggered through the VPN service by an authenticated user, provided the deployment uses the affected OpenVPN workflow and accepts the relevant identity attributes.

The attacker generally needs valid VPN authentication through a configured RADIUS or LDAP identity source. Unauthenticated network access alone is not sufficient.

Avoid evaluating dynamically constructed shell commands. Pass values as separate arguments, validate identity data, and ensure privileged hooks perform only narrowly scoped operations.

Treat all directory and authentication attributes as untrusted, prohibit eval in privileged scripts, use shell-aware static analysis, and monitor VPN hooks for unexpected command execution.

It can be triggered through the VPN service by an authenticated user, provided the deployment uses the affected OpenVPN workflow and accepts the relevant identity attributes.

The attacker generally needs valid VPN authentication through a configured RADIUS or LDAP identity source. Unauthenticated network access alone is not sufficient.

Avoid evaluating dynamically constructed shell commands. Pass values as separate arguments, validate identity data, and ensure privileged hooks perform only narrowly scoped operations.

Treat all directory and authentication attributes as untrusted, prohibit eval in privileged scripts, use shell-aware static analysis, and monitor VPN hooks for unexpected command execution.

Find out what's already
exploitable in your codebase.