/

CVE-2026-54674

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in FreePBX UCP Access

CVE-2026-54674

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Authenticated Remote Command Execution

Severity:

HIGH RISK

(8.8)

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

FreePBX contains an operating system command injection vulnerability in the User Control Panel (UCP). An authenticated UCP user may be able to submit specially crafted HTTP parameter values that cause arbitrary commands to run as the webserver account on the PBX.

FreePBX contains an operating system command injection vulnerability in the User Control Panel (UCP). An authenticated UCP user may be able to submit specially crafted HTTP parameter values that cause arbitrary commands to run as the webserver account on the PBX.

Affected context

The issue affects FreePBX deployments using vulnerable UCP functionality before the relevant security fixes. It occurs when UCP processes certain URL parameters without sufficiently sanitizing malicious command content, allowing lower-privileged authenticated users with UCP access to reach command execution behavior.

The issue affects FreePBX deployments using vulnerable UCP functionality before the relevant security fixes. It occurs when UCP processes certain URL parameters without sufficiently sanitizing malicious command content, allowing lower-privileged authenticated users with UCP access to reach command execution behavior.

Exploit preconditions

  • Attack surface: FreePBX User Control Panel HTTP endpoints
  • Required access: Valid authentication to UCP; administrative ACP access is not necessarily required
  • Trigger point: Processing of specially crafted URL parameters in UCP requests
  • Why exploitation is possible: Insufficient input sanitization allows attacker-controlled strings to be interpreted as operating system commands
  • Execution context: Commands run with the privileges of the webserver account, typically the asterisk user
  • Attack surface: FreePBX User Control Panel HTTP endpoints
  • Required access: Valid authentication to UCP; administrative ACP access is not necessarily required
  • Trigger point: Processing of specially crafted URL parameters in UCP requests
  • Why exploitation is possible: Insufficient input sanitization allows attacker-controlled strings to be interpreted as operating system commands
  • Execution context: Commands run with the privileges of the webserver account, typically the asterisk user

Why this happens

The vulnerability results from inadequate neutralization of attacker-controlled URL parameter values before they reach command execution functionality. This is an operating system command injection flaw mapped to CWE-78, where external input is incorporated into a system command without reliably separating data from executable syntax. Chaining carefully constructed command content can cause unintended binaries or commands to execute on the host.

The vulnerability results from inadequate neutralization of attacker-controlled URL parameter values before they reach command execution functionality. This is an operating system command injection flaw mapped to CWE-78, where external input is incorporated into a system command without reliably separating data from executable syntax. Chaining carefully constructed command content can cause unintended binaries or commands to execute on the host.

Potential impact

  • An authenticated UCP user may execute arbitrary commands as the webserver account
  • Attackers could modify PBX configuration, scripts, or stored data
  • The PBX may be used to access connected services or internal network resources
  • Malicious activity could disrupt telephony operations or expose sensitive information
  • Further privilege escalation may be possible if additional local weaknesses are present
  • An authenticated UCP user may execute arbitrary commands as the webserver account
  • Attackers could modify PBX configuration, scripts, or stored data
  • The PBX may be used to access connected services or internal network resources
  • Malicious activity could disrupt telephony operations or expose sensitive information
  • Further privilege escalation may be possible if additional local weaknesses are present

General mitigation guidance

Mitigation focuses on eliminating shell interpretation of user-controlled values and reducing the trust placed in UCP input.

Common defensive patterns include:

  • Prefer direct library or API calls over shell commands
  • Use fixed command and argument allowlists where process execution is unavoidable
  • Apply strict type, format, length, and character validation to URL parameters
  • Pass arguments through APIs that do not invoke a shell
  • Run web-facing PBX components with the minimum necessary operating-system privileges
  • Restrict UCP permissions and exposure to only required users and networks
  • Separate webserver privileges from sensitive PBX administration and system functions

Mitigation focuses on eliminating shell interpretation of user-controlled values and reducing the trust placed in UCP input.

Common defensive patterns include:

  • Prefer direct library or API calls over shell commands
  • Use fixed command and argument allowlists where process execution is unavoidable
  • Apply strict type, format, length, and character validation to URL parameters
  • Pass arguments through APIs that do not invoke a shell
  • Run web-facing PBX components with the minimum necessary operating-system privileges
  • Restrict UCP permissions and exposure to only required users and networks
  • Separate webserver privileges from sensitive PBX administration and system functions

How teams detect issues like this

Organizations can look for command injection risks through:

  • Static analysis rules identifying shell execution APIs that receive request parameters
  • Code review checks for string concatenation involving URL, query, or form input
  • Testing that verifies metacharacters and unexpected argument structures are rejected
  • Web application firewall or gateway policies for suspicious command syntax in UCP requests
  • Process monitoring for unusual child processes launched by the PBX webserver account
  • Audit logging that correlates authenticated UCP activity with unexpected system commands

Automated code review and software composition analysis tools may help identify dangerous process-execution patterns, but findings should be validated against actual data flow and deployment controls.

Organizations can look for command injection risks through:

  • Static analysis rules identifying shell execution APIs that receive request parameters
  • Code review checks for string concatenation involving URL, query, or form input
  • Testing that verifies metacharacters and unexpected argument structures are rejected
  • Web application firewall or gateway policies for suspicious command syntax in UCP requests
  • Process monitoring for unusual child processes launched by the PBX webserver account
  • Audit logging that correlates authenticated UCP activity with unexpected system commands

Automated code review and software composition analysis tools may help identify dangerous process-execution patterns, but findings should be validated against actual data flow and deployment controls.

Sources

SourceLink
github.comgithub.com/FreePBX/security-reporting/security/advisories/GHSA-4jjr-8g5r-wv66

Frequently asked

questions

It can be reached through UCP over the network when the attacker has valid authenticated access and the affected endpoint is exposed.

No. UCP authentication is the key requirement, and UCP access may be granted to users with fewer privileges than ACP administrators.

Avoid passing user-controlled data to shell commands. Where process execution is unavoidable, use fixed allowlists, structured argument APIs, strict validation, and non-privileged service accounts.

Apply centralized input validation, review every system-command call for untrusted data flow, limit UCP exposure, and monitor webserver-child-process behavior for anomalies.

It can be reached through UCP over the network when the attacker has valid authenticated access and the affected endpoint is exposed.

No. UCP authentication is the key requirement, and UCP access may be granted to users with fewer privileges than ACP administrators.

Avoid passing user-controlled data to shell commands. Where process execution is unavoidable, use fixed allowlists, structured argument APIs, strict validation, and non-privileged service accounts.

Apply centralized input validation, review every system-command call for untrusted data flow, limit UCP exposure, and monitor webserver-child-process behavior for anomalies.

Find out what's already
exploitable in your codebase.