CVE-2026-111224: Netgate pfSense CE OpenVPN Asynchronous Connect Handler eval() OS Command Injection & Root RCE
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.
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) 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.
CVE-2026-111224: Netgate pfSense CE OpenVPN Asynchronous Connect Handler eval() OS Command Injection & Root RCEVULNERABILITY
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.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Executive Summary
Section titled “Executive Summary”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.
Technical Vulnerability Mechanics
Section titled “Technical Vulnerability Mechanics”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:
# 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:
- Outer Double-Quote Expansion: Before invoking
eval,/bin/shexpands${anchorname}inside the double-quoted string"/sbin/pfctl -a '${anchorname}' -f '${rulesfile}'". - Inner
evalTokenization:evalreceives 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}. - Missing External Identity Validation: While
src/usr/local/www/system_usermanager.phpblocks 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 RADIUSUser-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:#ffffffRoot 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):
# 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)orclient;sh -c ... #) executes arbitrary OS commands under theunboundsystem account upon connecting. - Internal DNS Cache Poisoning: Even without shell metacharacters, whitespace injection in
${CN}allows a connecting VPN client to inject arbitraryunbound-controlarguments 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:
# 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 natrm -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 ID | Target File / Subsystem | Vulnerable Sink & Exploitation Mechanism |
|---|---|---|
| CVE-2026-111214 | interfaces_qinq_edit.php | Unvalidated $_POST['if'] parent interface interpolated into /sbin/ifconfig {$qinq['if']} ... (root RCE). |
| CVE-2026-111215 | interfaces_wireless_edit.php | Unvalidated $_POST['if'] wireless parent passed to /sbin/ifconfig wlan create wlandev {$_POST['if']} (root RCE). |
| CVE-2026-111216 | system_gateways_edit.php | IPv6 link-local %zone suffix stripped by is_ipaddrv6() without charset validation, injected into start_dpinger() shell line (root RCE). |
| CVE-2026-111217 | firewall_virtual_ip_edit.php | Unvalidated CARP vhid passed to ifconfig / grep when queried via Stacked IP Alias or widgets/interfaces.widget.php. |
| CVE-2026-111218 | firewall_shaper_vinterface.php | Hidden POST field number passed without integer cast to /sbin/dnctl pipe delete {$this->GetNumber()} (root RCE). |
| CVE-2026-111219 | vpn_pppoe_edit.php | Base64-decoded PPPoE username containing newline (\n) + ! external password program injected into /var/etc/mpd.secret. |
| CVE-2026-111220 | vpn_pppoe_edit.php | Broken boolean check (!is_numericint($hour) && ($hour >= 0) && ($hour <= 23)—always false!) and unvalidated ptpid inject arbitrary root cron lines into /etc/crontab. |
| CVE-2026-111221 | vpn.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-111222 | system.php -> rc.php_ini_setup | Double-quote breakout in timezone injects auto_prepend_file=/tmp/payload.php into /usr/local/etc/php.ini loaded by root PHP-FPM. |
| CVE-2026-111223 | vpn_ipsec_mobile.php | Mobile IPsec login_banner interpolated into StrongSwan charon startup scripts. |
| CVE-2026-111226 | system_advanced_admin.php | CRLF 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-111227 | services_unbound_acls.php | CRLF in Unbound ACL aclname or description injects server: include: directives into unbound.conf without calling test_unbound_config(). |
| CVE-2026-111228 | services_unbound_advanced.php | CRLF in sock_queue_timeout (Form_Select) injects arbitrary configuration directives into /var/unbound/unbound.conf. |
| CVE-2026-111229 | captiveportal.inc | Captive Portal HA XML-RPC sync backwardsyncip interpolated unquoted into pfctl -a {$cpzone_prefix}_auth/{$host}. |
Forensic Analysis & Detection Engineering
Section titled “Forensic Analysis & Detection Engineering”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-pfsense111224status: experimentaldescription: 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-interpolationsauthor: Hermes Threat Intelligencedate: 2026/10/18logsource: product: pfsense service: openvpndetection: selection_process: process|contains: - 'openvpn' - 'pfctl' - 'unbound-control' selection_metacharacters: message|contains: - "'; " - "';" - '$(' - '`' - '/bin/sh' - '/tmp/' - 'local_data ' condition: selection_process and selection_metacharactersfalsepositives: - None expected in valid OpenVPN usernames or X.509 certificate Common Nameslevel: criticaltags: - attack.initial_access - attack.execution - attack.t1059.004 - attack.t1133 - cve.2026-111224 - cve.2026-111225title: Netgate pfSense CE Daemon Config & php.ini Breakout Exploitation (CVE-2026-111220 / CVE-2026-111222 / CVE-2026-111226)id: 3d7a8f12-1112-4222-9a51-pfsense111222status: experimentaldescription: Detects HTTP POST requests to pfSense WebGUI endpoints containing php.ini auto_prepend_file, sshguard BACKEND overrides, or crontab newline injections.author: Hermes Threat Intelligencedate: 2026/10/18logsource: category: webserverdetection: selection_uri: cs-method: 'POST' cs-uri-stem|contains: - '/system.php' - '/system_advanced_admin.php' - '/vpn_pppoe_edit.php' - '/interfaces_qinq_edit.php' - '/interfaces_wireless_edit.php' - '/system_gateways_edit.php' - '/services_unbound_acls.php' - '/services_unbound_advanced.php' selection_payload: request_body|contains: - 'auto_prepend_file' - 'auto_append_file' - 'BACKEND=' - '%0a' - '%0d%0a' - 'up-script' - 'down-script' condition: selection_uri and selection_payloadfalsepositives: - Legitimate administrative configuration updates without CRLF or directive breakoutslevel: criticaltags: - attack.privilege_escalation - attack.persistence - attack.t1053.003 - attack.t1505.003 - cve.2026-111222 - cve.2026-111226#!/bin/sh# Hermes Forensic Triage Script for Netgate pfSense CE (CVE-2026-111214 through CVE-2026-111229)echo "[*] 1. Checking /usr/local/etc/php.ini for injected directives (CVE-2026-111222)..."grep -E -i "(auto_prepend_file|auto_append_file|allow_url_include)" /usr/local/etc/php.ini /usr/local/etc/php/*.ini 2>/dev/null || true
echo "[*] 2. Checking /usr/local/etc/sshguard.conf for duplicate BACKEND= lines (CVE-2026-111226)..."grep -n "BACKEND" /usr/local/etc/sshguard.conf 2>/dev/null || true
echo "[*] 3. Auditing /etc/crontab for rogue PPPoE reset entries (CVE-2026-111220)..."grep -v -E "^(#|SHELL=|PATH=|HOME=|minute|\*|[0-9]+)" /etc/crontab 2>/dev/null || true
echo "[*] 4. Checking /var/etc/mpd*.conf & mpd.secret for injected scripts (CVE-2026-111219 / CVE-2026-111221)..."grep -E "(up-script|down-script|!)" /var/etc/mpd* 2>/dev/null || true
echo "[*] 5. Scanning OpenVPN logs for abnormal usernames or pfctl errors (CVE-2026-111224)..."grep -E "(';|\$\(|pfctl:|syntax error)" /var/log/openvpn.log 2>/dev/null | tail -n 25 || trueRemediation & Hardening Directives
Section titled “Remediation & Hardening Directives”- Patch
openvpn.connect_async.shandopenvpn.learn-address.shImmediately: Apply Netgate security updates or manually replace theeval "/sbin/pfctl ..."statements in/usr/local/sbin/openvpn.connect_async.shwith direct, non-eval/sbin/pfctl -a "${anchorname}"invocations preceded by a strict character allowlist (^[a-zA-Z0-9._@-]+$) on${username}and${CN}. - 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. - Enforce Strict Username Filtering at the RADIUS / FreeRADIUS / NPS Boundary:
Configure your upstream RADIUS/LDAP policy server to reject authentication requests whose
User-Nameattribute contains quotes, spaces, semicolons, or shell metacharacters before forwardingAccess-Acceptresponses to pfSense. - Revoke Non-Essential Delegated WebGUI Accounts (
CVE-2026-111214–CVE-2026-111228): Because pfSense runs PHP-FPM asroot, remove partial WebGUI privileges from untrusted or semi-trusted operators and restrict WebGUI access (443/tcp) strictly to dedicated management VLANs and jump hosts.