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

CVE-2026-111226: pfSense CE OS Command Injection Vulnerability

CVE-2026-111226 is an OS command injection flaw in pfSense CE versions 2.4.5 through 2.9.0 allowing authenticated users to execute commands as root. This article covers technical details, affected versions, and mitigation steps.

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-111226 Overview

CVE-2026-111226 is an OS command injection vulnerability [CWE-78] affecting pfSense CE versions 2.4.5 through 2.9.0. The flaw resides in the Login Protection settings exposed through system_advanced_admin.php in the WebGUI. Authenticated users holding the Advanced Admin Access privilege can supply malicious values for the sshguard threshold, block time, or detection time fields. These values are written unvalidated to sshguard.conf and later sourced as root when the service restarts, yielding arbitrary command execution with root privileges on the firewall appliance.

Critical Impact

Authenticated administrators can escalate from WebGUI access to root-level code execution on the pfSense host, fully compromising the firewall.

Affected Products

  • pfSense CE 2.4.5 through 2.9.0
  • Netgate pfSense Community Edition WebGUI (system_advanced_admin.php)
  • Login Protection subsystem backed by sshguard

Discovery Timeline

  • 2026-10-15 - CVE-2026-111226 published to the National Vulnerability Database (NVD)
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-111226

Vulnerability Analysis

The pfSense WebGUI exposes Login Protection controls that configure sshguard, the brute-force protection daemon. When an administrator submits the form, pfSense writes the supplied threshold, block time, and detection time values directly into sshguard.conf. The write path in syslog.inc performs no validation on newline characters, shell metacharacters, or command substitution syntax.

Because sshguard.conf is sourced by a shell as root during service restart, any attacker-controlled line is interpreted as a shell command. Submitting a payload containing a newline followed by $(...) or a direct command injects arbitrary instructions executed with root privileges. This converts a privileged WebGUI setting into a reliable local-to-root escalation primitive.

Root Cause

The root cause is missing input validation and output encoding in the configuration writer referenced in src/etc/inc/syslog.inc (lines 531-563) and the admin handler at src/usr/local/pfSense/include/www/system_advanced_admin.inc (lines 355-381). Numeric fields are treated as free-form text, and the resulting configuration file is executed by a shell interpreter rather than parsed as data.

Attack Vector

Exploitation requires an authenticated WebGUI session with the Advanced Admin Access privilege. The attacker navigates to System → Advanced → Admin Access, sets a Login Protection field to a payload that contains a newline and a shell command substitution such as $(id > /tmp/pwn), and saves the form. When sshguard is restarted, the shell sources the configuration file and executes the injected command as root. Technical write-ups and a proof-of-concept are available in the Abraxas Labs research article, the GitHub SSHGuard CRLF exploit repository, and the VulnCheck Netgate pfSense advisory.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-111226

Indicators of Compromise

  • Unexpected modifications to /usr/local/etc/sshguard.conf containing newlines, backticks, or $(...) sequences in THRESHOLD, BLOCK_TIME, or DETECTION_TIME fields.
  • Root-owned child processes spawned by sshguard or its init script shortly after a configuration save.
  • Audit log entries in /var/log/system.log showing system_advanced_admin.php POST requests immediately preceding service restarts.

Detection Strategies

  • Monitor sshguard.conf for non-numeric content in integer-only configuration keys.
  • Alert on administrator form submissions to system_advanced_admin.php where request bodies contain %0A, $(, or backtick characters.
  • Baseline the parent-child process tree for sshguard and flag deviations such as spawned shells, network tools, or file writes outside expected paths.

Monitoring Recommendations

  • Forward pfSense WebGUI access logs and shell audit logs to a central SIEM for correlation across sessions and configuration changes.
  • Enable file integrity monitoring on /usr/local/etc/sshguard.conf, /etc/inc/syslog.inc, and related include files.
  • Track privileged account usage of the Advanced Admin Access role and review session activity for unexpected configuration edits.

How to Mitigate CVE-2026-111226

Immediate Actions Required

  • Restrict WebGUI access to trusted management networks and enforce multi-factor authentication for all administrative accounts.
  • Audit the user and group assignments that grant the Advanced Admin Access privilege and revoke it from any account that does not require it.
  • Inspect sshguard.conf on all pfSense CE 2.4.5-2.9.0 hosts for signs of tampering and rotate credentials if evidence of exploitation is found.

Patch Information

At publication time, no fixed version is referenced in the NVD entry for pfSense CE 2.4.5 through 2.9.0. Administrators should consult the VulnCheck Netgate pfSense advisory and the pfSense syslog.inc code review for current vendor guidance and apply any subsequent Netgate release that addresses the input validation flaw.

Workarounds

  • Place the pfSense WebGUI behind a VPN or jump host and block direct Internet exposure of the management interface.
  • Temporarily disable Login Protection configuration changes by limiting the Advanced Admin Access privilege to a single break-glass account monitored for use.
  • Apply file integrity controls that reject writes to sshguard.conf outside of a controlled change window.
bash
# Configuration example: validate sshguard.conf contains only expected numeric values
grep -E '^(THRESHOLD|BLOCK_TIME|DETECTION_TIME)=[0-9]+$' /usr/local/etc/sshguard.conf \
  || echo "ALERT: non-numeric or injected content detected in sshguard.conf"

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.