Skip to content

CVE-2026-111224: Netgate pfSense CE OpenVPN Asynchronous Connect Handler eval() OS Command Injection & Root RCE

Density:
C-Level Executive Briefing CVE-2026-111224 CRITICAL SCORE 93/100

Critical OS command injection flaw in Netgate pfSense CE through 2.9.0. When an OpenVPN server authenticates against an external RADIUS or LDAP backend, the client username bypasses the local WebGUI character filter and is interpolated into an eval '/sbin/pfctl -a ...' statement inside /usr/local/sbin/openvpn.connect_async.sh, executing arbitrary commands as root on the perimeter firewall.

HTS

HERMES THREAT SCORE & PERIMETER FIREWALL EVALUATION

Target: Netgate pfSense CE OpenVPN Connect & DNS Hooks (src/usr/local/sbin/openvpn.connect_async.sh & openvpn.learn-address.sh)
Confidence: 98%
93 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 17 / 20
Weaponization 19 / 20
Exposure 19 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20
⚖️ Divergence & Operational Rationale

While CVSS v3.1 scores CVE-2026-111224 at 8.8 (High) and CVSS v4.0 scores it at 7.7 due to authentication and server-mode preconditions (PR:L / AT:P), the Hermes Threat Score elevates this vulnerability to 93 (CRITICAL). Netgate pfSense CE is a ubiquitous perimeter firewall and VPN gateway across enterprise branch offices, managed service providers (MSPs), and sovereign infrastructure. Because external RADIUS and LDAP usernames are never validated against pfSense's local WebGUI character whitelist, any compromised Active Directory/LDAP credential, federated RADIUS user, or attacker-controlled RADIUS response can break out of single quotes inside eval and execute arbitrary shell commands as uid=0 (root) directly on the firewall—disclosed alongside 15 additional shell and daemon configuration injection flaws (CVE-2026-111214 through CVE-2026-111229) with full public exploit chains.

🕸️ Connected Knowledge Graph & Provenance

CVE-2026-111224: Netgate pfSense CE OpenVPN Asynchronous Connect Handler eval() OS Command Injection & Root RCEVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTNetgate pfSense CE Firewall & VPN Appliance
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

🔍 Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in Netgate pfSense CE Firewall & VPN Appliance documented in Hermes dossier.”

Supporting Verified Evidence:

On October 15–16, 2026, VulnCheck Initial Access Intelligence and security researchers at Abraxas Labs (@abraxas_null) disclosed CVE-2026-111224, a critical OS Command Injection vulnerability (CWE-78) affecting Netgate pfSense Community Edition (CE) through version 2.9.0 (2.9.0-RELEASE / public master commit 9363ac5b8651a1c7a333180425ce7719070f95f9).

When a pfSense OpenVPN server operates in server_user or server_tls_user mode backed by an external RADIUS or LDAP authentication server, OpenVPN invokes the helper script /usr/local/sbin/openvpn.connect_async.sh as root upon client connection and disconnection. Unlike local pfSense accounts—whose usernames are restricted by the WebGUI (system_usermanager.php) to alphanumeric characters, periods, hyphens, and underscores—usernames authenticated via RADIUS or LDAP are passed into the OpenVPN environment without character-set sanitization. Inside openvpn.connect_async.sh, the script embeds ${username} into anchorname and executes eval "/sbin/pfctl -a '${anchorname}' -f '${rulesfile}'". Because single quotes sit inside a double-quoted eval argument, shell variable expansion occurs before eval parses the command string. A crafted username containing a single quote and shell metacharacters (alice'; <payload>; : ') escapes the -a argument and executes arbitrary OS commands as root (uid=0) on the firewall appliance.


Root Cause 1: Double-Expansion via eval in openvpn.connect_async.sh (CVE-2026-111224)

Section titled “Root Cause 1: Double-Expansion via eval in openvpn.connect_async.sh (CVE-2026-111224)”

When an OpenVPN client completes user authentication, OpenVPN runs /usr/local/sbin/openvpn.connect_async.sh with the authenticated username exported in the environment variable ${username} (or $common_name). In src/usr/local/sbin/openvpn.connect_async.sh (lines 83–114), pfSense dynamically loads and flushes per-user Packet Filter (pf) anchors:

Terminal window
# VULNERABLE: src/usr/local/sbin/openvpn.connect_async.sh (Lines 83-114)
# Constructed from OpenVPN environment variables:
anchorname="openvpn/${dev}_${username}_${trusted_port}"
# On client-connect (loading per-user pf rules):
eval "/sbin/pfctl -a '${anchorname}' -f '${rulesfile}'"
# On client-disconnect (flushing per-user pf rules and NAT state):
eval "/sbin/pfctl -a '${anchorname}' -F rules"
eval "/sbin/pfctl -a '${anchorname}' -F nat"
rm "/tmp/${username}"

This pattern exhibits a classic shell double-evaluation vulnerability:

  1. Outer Double-Quote Expansion: Before invoking eval, /bin/sh expands ${anchorname} inside the double-quoted string "/sbin/pfctl -a '${anchorname}' -f '${rulesfile}'".
  2. Inner eval Tokenization: eval receives the expanded string and re-parses it as a full shell command line, interpreting any single quotes ('), semicolons (;), command substitutions ($(...)), or backticks injected via ${username}.
  3. Missing External Identity Validation: While src/usr/local/www/system_usermanager.php blocks special characters in locally created pfSense usernames (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['username'])), external RADIUS and LDAP servers happily authenticate usernames containing quotes or spaces (or map a display/alias attribute or self-registered identity into the RADIUS User-Name / LDAP bind attribute).
flowchart TD
subgraph Attacker["Remote VPN Client / Federated Directory Identity"]
VPN["OpenVPN Client Connection<br/>Mode: server_user or server_tls_user<br/>Username: alice'; sh /tmp/payload; : '"]
end
subgraph AuthBackend["External Authentication Backend"]
RAD["RADIUS / LDAP Server<br/>(Bypasses local system_usermanager.php regex)"]
VPN -- "Authenticates Username" --> RAD
end
subgraph pfSense["Netgate pfSense CE (<= 2.9.0) — uid=0 (root)"]
OVPN["OpenVPN Daemon (root)<br/>Invokes /usr/local/sbin/openvpn.connect_async.sh"]
RAD -- "Accepts Auth & Sets $username" --> OVPN
OVPN --> Anchor["Constructs Anchor Name:<br/>anchorname = openvpn/${dev}_${username}_${trusted_port}"]
Anchor --> Eval{"eval \"/sbin/pfctl -a '${anchorname}' -f '${rulesfile}'\"<br/>Single-Quote Breakout in eval (CWE-78)"}
Eval --> RootRCE["Arbitrary Command Execution as root (uid=0)<br/>Full Perimeter Firewall Compromise"]
end
style Eval fill:#ff4d4d,stroke:#990000,color:#ffffff
style RootRCE fill:#ff1a1a,stroke:#800000,color:#ffffff

Root Cause 2: Certificate CN Injection in openvpn.learn-address.sh (CVE-2026-111225)

Section titled “Root Cause 2: Certificate CN Injection in openvpn.learn-address.sh (CVE-2026-111225)”

Disclosed alongside CVE-2026-111224 is CVE-2026-111225 in /usr/local/sbin/openvpn.learn-address.sh (lines 57–62). When the Unbound DNS Resolver option “Register OpenVPN clients in the DNS Resolver” (unbound/regovpnclients in config.xml) is enabled, OpenVPN invokes openvpn.learn-address.sh whenever a virtual IP address is assigned or updated, passing the client certificate’s common_name as $3 (CN=$3):

Terminal window
# VULNERABLE: src/usr/local/sbin/openvpn.learn-address.sh (Lines 57-62)
CN=$3
...
/usr/bin/su -m unbound -c "/usr/local/sbin/unbound-control -c /var/unbound/unbound.conf local_data ${CN}.${DOMAIN} ${ARECORD} ${IP}"

Because ${CN} is interpolated unquoted inside the double-quoted command string passed to su -m unbound -c "...":

  • Arbitrary Command Execution as unbound: A client certificate whose Common Name (CN) contains shell metacharacters (e.g., client$(id>/tmp/pwn) or client;sh -c ... #) executes arbitrary OS commands under the unbound system account upon connecting.
  • Internal DNS Cache Poisoning: Even without shell metacharacters, whitespace injection in ${CN} allows a connecting VPN client to inject arbitrary unbound-control arguments and poison internal DNS records resolved by hosts behind the firewall.

Secure Remediation Pattern (Removing eval & Enforcing Strict Argument Vectors)

Section titled “Secure Remediation Pattern (Removing eval & Enforcing Strict Argument Vectors)”

Fixing both scripts requires eliminating eval, passing arguments directly to pfctl without an intermediate shell parser, and enforcing strict character-set validation on ${username} and ${CN} regardless of the upstream authentication source:

src/usr/local/sbin/openvpn.connect_async.sh
# 1. Enforce strict allowlist on external RADIUS/LDAP username before use:
case "${username}" in
*[!a-zA-Z0-9._@-]*|"")
logger -t openvpn "Blocked invalid characters in OpenVPN username"
exit 1
;;
esac
anchorname="openvpn/${dev}_${username}_${trusted_port}"
# 2. Invoke pfctl directly with quoted positional arguments (NO eval!):
/sbin/pfctl -a "${anchorname}" -f "${rulesfile}"
# On disconnect:
/sbin/pfctl -a "${anchorname}" -F rules
/sbin/pfctl -a "${anchorname}" -F nat
rm -f -- "/tmp/${username}"

The 16-CVE pfSense CE 2.9.0 “Leftover Interpolations” Cluster (CVE-2026-111214 – CVE-2026-111229)

Section titled “The 16-CVE pfSense CE 2.9.0 “Leftover Interpolations” Cluster (CVE-2026-111214 – CVE-2026-111229)”

Abraxas Labs’ audit revealed a systemic architectural hazard in pfSense CE <= 2.9.0: the NGINX web server forwards all WebGUI PHP requests to PHP-FPM workers running directly as root (uid=0). While pfSense’s privilege definition table (src/etc/inc/priv.defs.inc) flags certain administrative pages with standard-warning-root (“Allows user to execute arbitrary commands”), dozens of seemingly restricted delegation roles (such as managing a single VLAN/QinQ interface, traffic shaper limiter, gateway monitor, or Unbound ACL) were assumed safe for low-privilege operators.

In reality, 14 WebGUI endpoints trusted HTML <select> drop-downs (Form_Select), hidden POST inputs, or broken boolean validation logic and interpolated them straight into /bin/sh -c (mwexec()/exec()) or root daemon configurations:

CVE IDTarget File / SubsystemVulnerable Sink & Exploitation Mechanism
CVE-2026-111214interfaces_qinq_edit.phpUnvalidated $_POST['if'] parent interface interpolated into /sbin/ifconfig {$qinq['if']} ... (root RCE).
CVE-2026-111215interfaces_wireless_edit.phpUnvalidated $_POST['if'] wireless parent passed to /sbin/ifconfig wlan create wlandev {$_POST['if']} (root RCE).
CVE-2026-111216system_gateways_edit.phpIPv6 link-local %zone suffix stripped by is_ipaddrv6() without charset validation, injected into start_dpinger() shell line (root RCE).
CVE-2026-111217firewall_virtual_ip_edit.phpUnvalidated CARP vhid passed to ifconfig / grep when queried via Stacked IP Alias or widgets/interfaces.widget.php.
CVE-2026-111218firewall_shaper_vinterface.phpHidden POST field number passed without integer cast to /sbin/dnctl pipe delete {$this->GetNumber()} (root RCE).
CVE-2026-111219vpn_pppoe_edit.phpBase64-decoded PPPoE username containing newline (\n) + ! external password program injected into /var/etc/mpd.secret.
CVE-2026-111220vpn_pppoe_edit.phpBroken boolean check (!is_numericint($hour) && ($hour >= 0) && ($hour <= 23)—always false!) and unvalidated ptpid inject arbitrary root cron lines into /etc/crontab.
CVE-2026-111221vpn.inc (vpn_l2tp_Server / PPPoE)Missing get_mpd_str() escaping on server RADIUS secret allows " quote-close and newline injection of set iface up-script into mpd.conf.
CVE-2026-111222system.php -> rc.php_ini_setupDouble-quote breakout in timezone injects auto_prepend_file=/tmp/payload.php into /usr/local/etc/php.ini loaded by root PHP-FPM.
CVE-2026-111223vpn_ipsec_mobile.phpMobile IPsec login_banner interpolated into StrongSwan charon startup scripts.
CVE-2026-111226system_advanced_admin.phpCRLF in sshguard_threshold injects a second BACKEND="/path/to/payload" line into /usr/local/etc/sshguard.conf (last definition wins, executed as root).
CVE-2026-111227services_unbound_acls.phpCRLF in Unbound ACL aclname or description injects server: include: directives into unbound.conf without calling test_unbound_config().
CVE-2026-111228services_unbound_advanced.phpCRLF in sock_queue_timeout (Form_Select) injects arbitrary configuration directives into /var/unbound/unbound.conf.
CVE-2026-111229captiveportal.incCaptive Portal HA XML-RPC sync backwardsyncip interpolated unquoted into pfctl -a {$cpzone_prefix}_auth/{$host}.

Defenders operating Netgate pfSense CE or Plus appliances should immediately audit /var/log/openvpn.log, /var/log/system.log, /etc/crontab, /usr/local/etc/php.ini, and /usr/local/etc/sshguard.conf for unauthorized modifications or shell metacharacters. Consult our guides on Linux Process Memory Analysis and Initial Access TTPs for perimeter appliance incident response.

title: Netgate pfSense CE OpenVPN Username or CN Shell Injection Attempt (CVE-2026-111224 / CVE-2026-111225)
id: 9b3e1a44-1112-4224-b81d-pfsense111224
status: experimental
description: Detects suspicious shell metacharacters, single-quote breakouts, or command substitutions in pfSense OpenVPN authentication logs or pfctl anchor invocations exploiting CVE-2026-111224 and CVE-2026-111225.
references:
- https://vulncheck.com/advisories/netgate-pfsense-ce-through-2.9.0-os-command-injection-via-openvpn-connect-async-sh
- https://abraxaslabs.tech/research/pfsense-ce-leftovers/shell-interpolations
author: Hermes Threat Intelligence
date: 2026/10/18
logsource:
product: pfsense
service: openvpn
detection:
selection_process:
process|contains:
- 'openvpn'
- 'pfctl'
- 'unbound-control'
selection_metacharacters:
message|contains:
- "'; "
- "';"
- '$('
- '`'
- '/bin/sh'
- '/tmp/'
- 'local_data '
condition: selection_process and selection_metacharacters
falsepositives:
- None expected in valid OpenVPN usernames or X.509 certificate Common Names
level: critical
tags:
- attack.initial_access
- attack.execution
- attack.t1059.004
- attack.t1133
- cve.2026-111224
- cve.2026-111225

  1. Patch openvpn.connect_async.sh and openvpn.learn-address.sh Immediately: Apply Netgate security updates or manually replace the eval "/sbin/pfctl ..." statements in /usr/local/sbin/openvpn.connect_async.sh with direct, non-eval /sbin/pfctl -a "${anchorname}" invocations preceded by a strict character allowlist (^[a-zA-Z0-9._@-]+$) on ${username} and ${CN}.
  2. Disable OpenVPN Dynamic DNS Registration If Unused (CVE-2026-111225): Navigate to Services > DNS Resolver > General Settings and uncheck Register OpenVPN clients in the DNS Resolver (regovpnclients) unless strictly required and patched.
  3. Enforce Strict Username Filtering at the RADIUS / FreeRADIUS / NPS Boundary: Configure your upstream RADIUS/LDAP policy server to reject authentication requests whose User-Name attribute contains quotes, spaces, semicolons, or shell metacharacters before forwarding Access-Accept responses to pfSense.
  4. Revoke Non-Essential Delegated WebGUI Accounts (CVE-2026-111214 – CVE-2026-111228): Because pfSense runs PHP-FPM as root, remove partial WebGUI privileges from untrusted or semi-trusted operators and restrict WebGUI access (443/tcp) strictly to dedicated management VLANs and jump hosts.

Section titled “Strategic Cross-References & Knowledge Graph Links”