/

CVE-2026-111229

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in pfSense Captive Portal

CVE-2026-111229

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

A command injection vulnerability in pfSense CE's Captive Portal high-availability synchronization functionality allows a privileged user to influence data used in a system command. When attacker-controlled XML-RPC responses provide crafted connected-user fields, the resulting command may execute with root privileges.

A command injection vulnerability in pfSense CE's Captive Portal high-availability synchronization functionality allows a privileged user to influence data used in a system command. When attacker-controlled XML-RPC responses provide crafted connected-user fields, the resulting command may execute with root privileges.

Affected context

The vulnerability occurs in pfSense CE deployments that use Captive Portal high-availability synchronization and process connected-user data received from a configured synchronization endpoint. Risk increases when a user has the Captive Portal HA privilege and the endpoint can return untrusted values that reach firewall-management command construction without adequate escaping.

The vulnerability occurs in pfSense CE deployments that use Captive Portal high-availability synchronization and process connected-user data received from a configured synchronization endpoint. Risk increases when a user has the Captive Portal HA privilege and the endpoint can return untrusted values that reach firewall-management command construction without adequate escaping.

Exploit preconditions

  • Attack surface: Captive Portal high-availability synchronization and its XML-RPC data-processing path
  • Required access: A pfSense account with the Captive Portal HA privilege, or equivalent ability to influence the synchronization configuration
  • Trigger point: Processing connected-user records during captive portal firewall rule handling
  • Why exploitation is possible: Values from remote synchronization data can reach a shell command without reliable separation between data and command syntax
  • Attack surface: Captive Portal high-availability synchronization and its XML-RPC data-processing path
  • Required access: A pfSense account with the Captive Portal HA privilege, or equivalent ability to influence the synchronization configuration
  • Trigger point: Processing connected-user records during captive portal firewall rule handling
  • Why exploitation is possible: Values from remote synchronization data can reach a shell command without reliable separation between data and command syntax

Why this happens

The underlying bug is an OS command injection caused by incorporating externally influenced ip or mac field values into a shell command without sufficient escaping or structured argument handling. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data intended as command arguments can be interpreted as shell syntax.

The underlying bug is an OS command injection caused by incorporating externally influenced ip or mac field values into a shell command without sufficient escaping or structured argument handling. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data intended as command arguments can be interpreted as shell syntax.

Potential impact

  • An attacker may execute arbitrary commands with root privileges
  • The pfSense firewall appliance could be fully compromised
  • Configuration, traffic-control, and authentication data could be altered
  • Network traffic could be redirected, blocked, or monitored
  • The compromised appliance could be used to access connected systems
  • An attacker may execute arbitrary commands with root privileges
  • The pfSense firewall appliance could be fully compromised
  • Configuration, traffic-control, and authentication data could be altered
  • Network traffic could be redirected, blocked, or monitored
  • The compromised appliance could be used to access connected systems

General mitigation guidance

Mitigation generally focuses on preventing untrusted values from being interpreted by a shell and reducing the privileges available to command-processing components.

Common defensive patterns include:

  • Prefer direct system APIs or argument-array process execution over shell command construction
  • Apply strict allowlist validation for IP and MAC address fields before processing
  • Treat XML-RPC synchronization data as untrusted, even when it originates from an administratively configured endpoint
  • Separate data validation from command execution and reject malformed records by default
  • Restrict Captive Portal HA privileges and synchronization endpoints according to least privilege
  • Limit the firewall appliance's ability to reach unnecessary management or internal services

Mitigation generally focuses on preventing untrusted values from being interpreted by a shell and reducing the privileges available to command-processing components.

Common defensive patterns include:

  • Prefer direct system APIs or argument-array process execution over shell command construction
  • Apply strict allowlist validation for IP and MAC address fields before processing
  • Treat XML-RPC synchronization data as untrusted, even when it originates from an administratively configured endpoint
  • Separate data validation from command execution and reject malformed records by default
  • Restrict Captive Portal HA privileges and synchronization endpoints according to least privilege
  • Limit the firewall appliance's ability to reach unnecessary management or internal services

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules for string concatenation or interpolation used to build shell commands
  • Code review checks for subprocess or shell invocation with externally sourced values
  • Searches for firewall-management commands receiving unsanitized XML-RPC, HTTP, or configuration data
  • Runtime monitoring for unexpected root processes, command interpreters, or changes to firewall rules
  • Policy enforcement requiring structured process APIs, strict input schemas, and allowlisted network-identity formats
  • Automated security review tools that flag shell invocation and missing input validation

Detection approaches commonly include:

  • Static analysis rules for string concatenation or interpolation used to build shell commands
  • Code review checks for subprocess or shell invocation with externally sourced values
  • Searches for firewall-management commands receiving unsanitized XML-RPC, HTTP, or configuration data
  • Runtime monitoring for unexpected root processes, command interpreters, or changes to firewall rules
  • Policy enforcement requiring structured process APIs, strict input schemas, and allowlisted network-identity formats
  • Automated security review tools that flag shell invocation and missing input validation

Sources

SourceLink
abraxaslabs.techabraxaslabs.tech/research/pfsense-ce-leftovers
github.comgithub.com/abraxas/pfsense-cp-ha-pfctl
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/etc/inc/captiveportal.inc#L2958-L2966
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/usr/local/www/services_captiveportal_hasync.php#L106-L140
vulncheck.comvulncheck.com/advisories/netgate-pfsense-ce-2.7.0-through-2.9.0-command-injection-via-captive-portal-ha-sync

Frequently asked

questions

Exploitability depends on deployment and access controls. It can be triggered through the Captive Portal HA processing path when an attacker can influence the synchronization configuration or the data returned by its configured endpoint.

The described condition requires the Captive Portal HA privilege or another means of controlling the relevant synchronization behavior. The resulting command execution occurs with root-level authority.

Avoid shell interpretation entirely by using direct APIs or structured argument execution, and strictly validate synchronization fields against expected IP and MAC address formats.

Treat synchronization responses as untrusted input, enforce least privilege, review every shell invocation for data-flow risks, and monitor firewall appliances for unexpected privileged command execution.

Exploitability depends on deployment and access controls. It can be triggered through the Captive Portal HA processing path when an attacker can influence the synchronization configuration or the data returned by its configured endpoint.

The described condition requires the Captive Portal HA privilege or another means of controlling the relevant synchronization behavior. The resulting command execution occurs with root-level authority.

Avoid shell interpretation entirely by using direct APIs or structured argument execution, and strictly validate synchronization fields against expected IP and MAC address formats.

Treat synchronization responses as untrusted input, enforce least privilege, review every shell invocation for data-flow risks, and monitor firewall appliances for unexpected privileged command execution.

Find out what's already
exploitable in your codebase.