/

CVE-2026-111226

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in pfSense WebGUI Settings

CVE-2026-111226

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Root-Level Command Execution

Severity:

HIGH RISK

(7.2)

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 contains an OS command injection flaw in Login Protection settings, where insufficiently validated values can reach a root-owned shell configuration.

An authenticated WebGUI user with Advanced Admin Access may be able to execute commands as root when sshguard configuration is regenerated or sourced during restart.

pfSense contains an OS command injection flaw in Login Protection settings, where insufficiently validated values can reach a root-owned shell configuration.

An authenticated WebGUI user with Advanced Admin Access may be able to execute commands as root when sshguard configuration is regenerated or sourced during restart.

Affected context

The vulnerability occurs in pfSense CE deployments where privileged WebGUI users can edit Login Protection settings that influence sshguard configuration. Risk is present when submitted threshold, block-time, or detection-time values are written without adequate validation and later interpreted by a root-privileged shell process during service restart.

The vulnerability occurs in pfSense CE deployments where privileged WebGUI users can edit Login Protection settings that influence sshguard configuration. Risk is present when submitted threshold, block-time, or detection-time values are written without adequate validation and later interpreted by a root-privileged shell process during service restart.

Exploit preconditions

  • Attack surface: Authenticated pfSense WebGUI Login Protection settings
  • Required access: An account with Advanced Admin Access privilege
  • Trigger point: Regeneration or restart of the sshguard service after configuration changes
  • Why exploitation is possible: User-controlled values are written to a shell-sourced configuration file without sufficiently restricting shell-significant content
  • Attack surface: Authenticated pfSense WebGUI Login Protection settings
  • Required access: An account with Advanced Admin Access privilege
  • Trigger point: Regeneration or restart of the sshguard service after configuration changes
  • Why exploitation is possible: User-controlled values are written to a shell-sourced configuration file without sufficiently restricting shell-significant content

Why this happens

The underlying bug is an OS command injection condition mapped to CWE-78. Configuration values originating from a privileged administrative interface are treated as trusted text, written into a file that is later sourced or interpreted by a shell running as root, and insufficiently constrained before that interpretation. This unsafe trust boundary allows data intended as numeric settings to influence command parsing.

The underlying bug is an OS command injection condition mapped to CWE-78. Configuration values originating from a privileged administrative interface are treated as trusted text, written into a file that is later sourced or interpreted by a shell running as root, and insufficiently constrained before that interpretation. This unsafe trust boundary allows data intended as numeric settings to influence command parsing.

Potential impact

  • An attacker may execute arbitrary commands with root privileges
  • The firewall appliance could be fully compromised
  • Security settings, traffic controls, or logging could be altered
  • Credentials and sensitive configuration data could be exposed
  • The compromised appliance could be used to access connected networks or systems
  • An attacker may execute arbitrary commands with root privileges
  • The firewall appliance could be fully compromised
  • Security settings, traffic controls, or logging could be altered
  • Credentials and sensitive configuration data could be exposed
  • The compromised appliance could be used to access connected networks or systems

General mitigation guidance

Mitigation generally focuses on preventing administrative input from becoming shell syntax and reducing the privileges of configuration-processing components.

Common defensive patterns include:

  • Enforcing strict numeric schemas and range checks for all sshguard timing and threshold values
  • Rejecting newlines, shell metacharacters, substitutions, and unexpected encoding before persistence
  • Avoiding shell-sourced configuration files for data-only settings
  • Using structured configuration formats and APIs that do not evaluate values as commands
  • Separating configuration data from executable shell logic
  • Applying least privilege to service restart and configuration-processing operations
  • Limiting Advanced Admin Access to trusted accounts and protecting those accounts with strong authentication

Mitigation generally focuses on preventing administrative input from becoming shell syntax and reducing the privileges of configuration-processing components.

Common defensive patterns include:

  • Enforcing strict numeric schemas and range checks for all sshguard timing and threshold values
  • Rejecting newlines, shell metacharacters, substitutions, and unexpected encoding before persistence
  • Avoiding shell-sourced configuration files for data-only settings
  • Using structured configuration formats and APIs that do not evaluate values as commands
  • Separating configuration data from executable shell logic
  • Applying least privilege to service restart and configuration-processing operations
  • Limiting Advanced Admin Access to trusted accounts and protecting those accounts with strong authentication

How teams detect issues like this

Detection may include static analysis for user-controlled values concatenated into shell scripts or files later processed with shell evaluation. Code review should examine WebGUI-to-configuration data flows, especially numeric settings written into root-owned files and service restart handlers. Runtime monitoring can alert on unexpected changes to sshguard configuration, unusual administrative activity, and shell process creation by firewall services. Policy enforcement can require schema validation and prohibit shell evaluation of externally supplied configuration data; automated code-review tools may help identify these patterns.

Detection may include static analysis for user-controlled values concatenated into shell scripts or files later processed with shell evaluation. Code review should examine WebGUI-to-configuration data flows, especially numeric settings written into root-owned files and service restart handlers. Runtime monitoring can alert on unexpected changes to sshguard configuration, unusual administrative activity, and shell process creation by firewall services. Policy enforcement can require schema validation and prohibit shell evaluation of externally supplied configuration data; automated code-review tools may help identify these patterns.

Sources

SourceLink
abraxaslabs.techabraxaslabs.tech/research/pfsense-ce-leftovers
github.comgithub.com/abraxas/pfsense-sshguard-crlf
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/etc/inc/syslog.inc#L531-L563
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/usr/local/pfSense/include/www/system_advanced_admin.inc#L355-L381
vulncheck.comvulncheck.com/advisories/netgate-pfsense-ce-2.4.5-through-2.9.0-os-command-injection-via-system-advanced-admin-php

Frequently asked

questions

It can be reachable through the WebGUI over the network, but exploitation requires successful authentication and the Advanced Admin Access privilege.

No. The relevant attack surface is the privileged Login Protection settings interface, although the required account permissions substantially limit who can reach it.

Treat all administrative input as untrusted, enforce strict numeric validation, and ensure configuration values are never interpreted as shell commands.

Use structured, non-evaluated configuration mechanisms, apply least privilege, review data flows into root-owned files, and monitor privileged configuration changes.

It can be reachable through the WebGUI over the network, but exploitation requires successful authentication and the Advanced Admin Access privilege.

No. The relevant attack surface is the privileged Login Protection settings interface, although the required account permissions substantially limit who can reach it.

Treat all administrative input as untrusted, enforce strict numeric validation, and ensure configuration values are never interpreted as shell commands.

Use structured, non-evaluated configuration mechanisms, apply least privilege, review data flows into root-owned files, and monitor privileged configuration changes.

Find out what's already
exploitable in your codebase.