/

CVE-2026-73665

Severity:

CRITICAL RISK

(9.8)

Missing Authorization (CWE-862) in FreePBX UCP Server

CVE-2026-73665

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.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

A missing authorization check in the FreePBX UCP Node server can allow unauthenticated clients to access custom Socket.IO namespaces that should require authentication. By sending crafted event values containing carriage-return or newline characters through the Asterisk Manager Interface action path, an attacker may execute arbitrary commands as the asterisk service user.

A missing authorization check in the FreePBX UCP Node server can allow unauthenticated clients to access custom Socket.IO namespaces that should require authentication. By sending crafted event values containing carriage-return or newline characters through the Asterisk Manager Interface action path, an attacker may execute arbitrary commands as the asterisk service user.

Affected context

The issue occurs in FreePBX deployments using the UCP Node server on its Socket.IO ports, including ports 8001 and 8003. Risk is present when custom namespaces do not consistently apply the intended authentication middleware and user-controlled event values can reach the Asterisk Manager Interface command path.

The issue occurs in FreePBX deployments using the UCP Node server on its Socket.IO ports, including ports 8001 and 8003. Risk is present when custom namespaces do not consistently apply the intended authentication middleware and user-controlled event values can reach the Asterisk Manager Interface command path.

Exploit preconditions

  • Attack surface: UCP Node server Socket.IO endpoints exposed on the network
  • Required access: No valid authentication is required when an affected custom namespace bypasses the authorization check
  • Trigger point: A crafted Socket.IO event reaches the Asterisk Manager Interface action-handling path
  • Why exploitation is possible: Middleware is applied inconsistently across namespaces, while insufficiently constrained event values can introduce command separators into downstream manager actions
  • Attack surface: UCP Node server Socket.IO endpoints exposed on the network
  • Required access: No valid authentication is required when an affected custom namespace bypasses the authorization check
  • Trigger point: A crafted Socket.IO event reaches the Asterisk Manager Interface action-handling path
  • Why exploitation is possible: Middleware is applied inconsistently across namespaces, while insufficiently constrained event values can introduce command separators into downstream manager actions

Why this happens

The vulnerability results from an authorization middleware scope mismatch. The application registers io.use(checkAuth) with the expectation that authentication will protect all namespaces, but the Socket.IO behavior in use applies that middleware only to the default namespace. Custom namespaces therefore may process unauthenticated connections.

The exposed event flow also permits control characters in values passed toward the Asterisk Manager Interface. This combines missing authorization with insufficient input validation and can allow attacker-controlled content to be interpreted as additional commands. The primary classification is CWE-862: Missing Authorization.

The vulnerability results from an authorization middleware scope mismatch. The application registers io.use(checkAuth) with the expectation that authentication will protect all namespaces, but the Socket.IO behavior in use applies that middleware only to the default namespace. Custom namespaces therefore may process unauthenticated connections.

The exposed event flow also permits control characters in values passed toward the Asterisk Manager Interface. This combines missing authorization with insufficient input validation and can allow attacker-controlled content to be interpreted as additional commands. The primary classification is CWE-862: Missing Authorization.

Potential impact

  • An unauthenticated attacker may execute arbitrary commands as the asterisk service user
  • The attacker could compromise FreePBX application processes and telephony data
  • System configuration, call records, or credentials may be altered or disclosed
  • The compromise could enable persistence, service disruption, or lateral movement
  • An unauthenticated attacker may execute arbitrary commands as the asterisk service user
  • The attacker could compromise FreePBX application processes and telephony data
  • System configuration, call records, or credentials may be altered or disclosed
  • The compromise could enable persistence, service disruption, or lateral movement

General mitigation guidance

Mitigation generally focuses on enforcing authorization at every namespace and reducing trust in values passed to manager or command interfaces.

Common defensive patterns include:

  • Apply authentication and authorization explicitly to each Socket.IO namespace and sensitive event
  • Use deny-by-default access controls for unauthenticated connections
  • Validate event names and values against strict schemas and reject carriage-return, newline, and other control characters where they are not required
  • Avoid constructing manager actions or commands through string concatenation
  • Use structured APIs and parameterized interfaces instead of shell-like command paths
  • Run the Asterisk and UCP services with the least privileges needed
  • Restrict exposure of UCP ports through network segmentation and firewall policy
  • Maintain centralized authorization logging and fail closed when identity or permission checks fail

Mitigation generally focuses on enforcing authorization at every namespace and reducing trust in values passed to manager or command interfaces.

Common defensive patterns include:

  • Apply authentication and authorization explicitly to each Socket.IO namespace and sensitive event
  • Use deny-by-default access controls for unauthenticated connections
  • Validate event names and values against strict schemas and reject carriage-return, newline, and other control characters where they are not required
  • Avoid constructing manager actions or commands through string concatenation
  • Use structured APIs and parameterized interfaces instead of shell-like command paths
  • Run the Asterisk and UCP services with the least privileges needed
  • Restrict exposure of UCP ports through network segmentation and firewall policy
  • Maintain centralized authorization logging and fail closed when identity or permission checks fail

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying authorization middleware registered only on a default namespace
  • Code review checks confirming that every custom namespace and sensitive event performs an explicit permission check
  • Searches for concatenation of Socket.IO event data into AMI actions, command strings, or protocol fields
  • Tests that connect anonymously to each namespace and verify denial of protected operations
  • Input-validation tests covering carriage returns, line feeds, delimiters, and other control characters
  • Runtime monitoring for unexpected UCP connections, AMI actions, and child processes launched by the asterisk account
  • Automated security review tools that model authorization flow and tainted data reaching command interfaces

Organizations can look for this class of issue through:

  • Static analysis rules identifying authorization middleware registered only on a default namespace
  • Code review checks confirming that every custom namespace and sensitive event performs an explicit permission check
  • Searches for concatenation of Socket.IO event data into AMI actions, command strings, or protocol fields
  • Tests that connect anonymously to each namespace and verify denial of protected operations
  • Input-validation tests covering carriage returns, line feeds, delimiters, and other control characters
  • Runtime monitoring for unexpected UCP connections, AMI actions, and child processes launched by the asterisk account
  • Automated security review tools that model authorization flow and tainted data reaching command interfaces

Sources

SourceLink
github.comgithub.com/FreePBX/security-reporting/security/advisories/GHSA-37j8-fhxx-9vhp

Frequently asked

questions

Yes. An attacker may exploit the issue over the network when the affected UCP Socket.IO service is reachable and a custom namespace fails to enforce authorization.

The described issue does not require valid authentication if the attacker can connect to a custom namespace that bypasses the intended authorization middleware.

Enforce authentication and authorization explicitly for every namespace and sensitive event, then validate and safely encode all values before they reach AMI or command-processing interfaces.

Use deny-by-default authorization, test every namespace independently, reject control characters where inappropriate, prefer structured APIs, and monitor privileged service activity.

Yes. An attacker may exploit the issue over the network when the affected UCP Socket.IO service is reachable and a custom namespace fails to enforce authorization.

The described issue does not require valid authentication if the attacker can connect to a custom namespace that bypasses the intended authorization middleware.

Enforce authentication and authorization explicitly for every namespace and sensitive event, then validate and safely encode all values before they reach AMI or command-processing interfaces.

Use deny-by-default authorization, test every namespace independently, reject control characters where inappropriate, prefer structured APIs, and monitor privileged service activity.

Find out what's already
exploitable in your codebase.