/

CVE-2026-111217

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in pfSense CARP VHID

CVE-2026-111217

Analyzed

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

Netgate pfSense CE contains an OS command injection flaw in CARP Virtual IP handling, where an unvalidated VHID can reach system command execution paths. An authenticated user with permission to edit Virtual IP settings may be able to execute commands with root privileges when the configuration is applied or CARP status is displayed.

Netgate pfSense CE contains an OS command injection flaw in CARP Virtual IP handling, where an unvalidated VHID can reach system command execution paths. An authenticated user with permission to edit Virtual IP settings may be able to execute commands with root privileges when the configuration is applied or CARP status is displayed.

Affected context

The vulnerability occurs in pfSense CE deployments that allow an authenticated user to edit Virtual IP settings and use CARP functionality. It involves VHID values being processed by interface configuration and CARP status routines without sufficient validation or safe argument handling. Exploitation depends on the affected configuration paths being invoked after a crafted value is stored.

The vulnerability occurs in pfSense CE deployments that allow an authenticated user to edit Virtual IP settings and use CARP functionality. It involves VHID values being processed by interface configuration and CARP status routines without sufficient validation or safe argument handling. Exploitation depends on the affected configuration paths being invoked after a crafted value is stored.

Exploit preconditions

  • Attack surface: Virtual IP and CARP configuration handling
  • Required access: An authenticated account with Virtual IP edit privileges
  • Trigger point: Interface configuration through interface_ipalias_configure() or CARP status rendering through get_carp_interface_status()
  • Why exploitation is possible: A user-controlled VHID is insufficiently validated before being incorporated into system command execution paths, allowing shell metacharacters to alter command interpretation
  • Attack surface: Virtual IP and CARP configuration handling
  • Required access: An authenticated account with Virtual IP edit privileges
  • Trigger point: Interface configuration through interface_ipalias_configure() or CARP status rendering through get_carp_interface_status()
  • Why exploitation is possible: A user-controlled VHID is insufficiently validated before being incorporated into system command execution paths, allowing shell metacharacters to alter command interpretation

Why this happens

The underlying defect is an OS command injection condition mapped to CWE-78. A value supplied through a configuration interface is treated as a command or shell-interpreted argument without reliably enforcing an allowlist, escaping context, or using structured process-execution APIs. As a result, specially crafted input can change the meaning of the command executed by the operating system.

The underlying defect is an OS command injection condition mapped to CWE-78. A value supplied through a configuration interface is treated as a command or shell-interpreted argument without reliably enforcing an allowlist, escaping context, or using structured process-execution APIs. As a result, specially crafted input can change the meaning of the command executed by the operating system.

Potential impact

  • An attacker may execute arbitrary commands with root privileges
  • The firewall configuration and security controls could be modified
  • Sensitive system, network, or credential data could be accessed
  • The device could be used for network reconnaissance or lateral movement
  • Availability may be affected through service disruption or system changes
  • An attacker may execute arbitrary commands with root privileges
  • The firewall configuration and security controls could be modified
  • Sensitive system, network, or credential data could be accessed
  • The device could be used for network reconnaissance or lateral movement
  • Availability may be affected through service disruption or system changes

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from configuration-driven operations and reducing the trust placed in administrative input.

Common defensive patterns include:

  • Accepting only the documented VHID format and enforcing strict length and range limits
  • Rejecting shell metacharacters and unexpected encodings through positive validation
  • Passing command arguments through structured process APIs rather than concatenating shell commands
  • Separating validation, normalization, and command construction before any system call
  • Applying least privilege to configuration and management processes where operationally feasible
  • Restricting Virtual IP administration to trusted roles and using additional administrative controls
  • Treating stored configuration values as untrusted whenever they can be modified by users

Mitigation generally focuses on removing shell interpretation from configuration-driven operations and reducing the trust placed in administrative input.

Common defensive patterns include:

  • Accepting only the documented VHID format and enforcing strict length and range limits
  • Rejecting shell metacharacters and unexpected encodings through positive validation
  • Passing command arguments through structured process APIs rather than concatenating shell commands
  • Separating validation, normalization, and command construction before any system call
  • Applying least privilege to configuration and management processes where operationally feasible
  • Restricting Virtual IP administration to trusted roles and using additional administrative controls
  • Treating stored configuration values as untrusted whenever they can be modified by users

How teams detect issues like this

Detection approaches can include:

  • Static analysis for shell command construction using concatenated or interpolated configuration values
  • Code review checks for system-call wrappers, shell invocation, and missing allowlist validation
  • Runtime monitoring for unexpected command execution by firewall management processes
  • Audit review of Virtual IP and CARP configuration changes, including unusual VHID values
  • Policy enforcement requiring structured argument APIs and security review for privileged command paths
  • Automated code review tools that identify CWE-78 patterns and unsafe input-to-command data flows

Detection approaches can include:

  • Static analysis for shell command construction using concatenated or interpolated configuration values
  • Code review checks for system-call wrappers, shell invocation, and missing allowlist validation
  • Runtime monitoring for unexpected command execution by firewall management processes
  • Audit review of Virtual IP and CARP configuration changes, including unusual VHID values
  • Policy enforcement requiring structured argument APIs and security review for privileged command paths
  • Automated code review tools that identify CWE-78 patterns and unsafe input-to-command data flows

Sources

SourceLink
abraxaslabs.techabraxaslabs.tech/research/pfsense-carp-vhid
abraxaslabs.techabraxaslabs.tech/research/pfsense-ce-leftovers
github.comgithub.com/abraxas/pfsense-carp-vhid
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/etc/inc/interfaces.inc#L3236-L3238
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/etc/inc/pfsense-utils.inc#L794
github.comgithub.com/pfsense/pfsense/blob/9363ac5b8651a1c7a333180425ce7719070f95f9/src/usr/local/pfSense/include/www/firewall_virtual_ip.inc#L200
vulncheck.comvulncheck.com/advisories/netgate-pfsense-ce-through-2.9.0-os-command-injection-via-carp-vhid

Frequently asked

questions

It may be exploitable through the pfSense management interface when that interface is reachable and the attacker has the required authenticated permissions. It is not generally an unauthenticated network attack.

The attacker needs an authenticated account with privileges to edit Virtual IP settings. The exact practical exposure depends on management-interface access controls and role assignments.

Avoid shell interpretation for user-controlled values, validate VHID values with a strict allowlist, and use structured process-execution interfaces with fixed commands and arguments.

Treat all administrative configuration values as untrusted, enforce least privilege, review privileged command paths, and continuously test input-to-command data flows through static analysis and security-focused code review.

It may be exploitable through the pfSense management interface when that interface is reachable and the attacker has the required authenticated permissions. It is not generally an unauthenticated network attack.

The attacker needs an authenticated account with privileges to edit Virtual IP settings. The exact practical exposure depends on management-interface access controls and role assignments.

Avoid shell interpretation for user-controlled values, validate VHID values with a strict allowlist, and use structured process-execution interfaces with fixed commands and arguments.

Treat all administrative configuration values as untrusted, enforce least privilege, review privileged command paths, and continuously test input-to-command data flows through static analysis and security-focused code review.

Find out what's already
exploitable in your codebase.