/

CVE-2026-73662

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in FreePBX Music Hold

CVE-2026-73662

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary 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 the FreePBX Music on Hold module allows dangerous options to be passed to permitted audio players. An authenticated administrator may abuse these options to execute arbitrary commands with the privileges of the Asterisk service account.

A command-injection vulnerability in the FreePBX Music on Hold module allows dangerous options to be passed to permitted audio players. An authenticated administrator may abuse these options to execute arbitrary commands with the privileges of the Asterisk service account.

Affected context

The issue occurs in FreePBX deployments using affected Music on Hold functionality, where administrator-controlled player configuration is validated before being used to invoke permitted audio-processing programs. Risk exists when the validation logic allows options capable of writing files, opening control channels, or creating Asterisk call files.

The issue occurs in FreePBX deployments using affected Music on Hold functionality, where administrator-controlled player configuration is validated before being used to invoke permitted audio-processing programs. Risk exists when the validation logic allows options capable of writing files, opening control channels, or creating Asterisk call files.

Exploit preconditions

  • Attack surface: FreePBX Music on Hold configuration handling
  • Required access: Authenticated administrator privileges or equivalent configuration access
  • Trigger point: Validation and subsequent execution of configured audio-player arguments
  • Why exploitation is possible: The option-filtering logic does not reject all dangerous arguments, allowing player features to produce command-execution effects through the Asterisk service environment
  • Attack surface: FreePBX Music on Hold configuration handling
  • Required access: Authenticated administrator privileges or equivalent configuration access
  • Trigger point: Validation and subsequent execution of configured audio-player arguments
  • Why exploitation is possible: The option-filtering logic does not reject all dangerous arguments, allowing player features to produce command-execution effects through the Asterisk service environment

Why this happens

The underlying bug is insufficient validation of command-line arguments supplied to an externally executed program. The application permits options that have side effects beyond normal media playback, including file creation and interaction with Asterisk control mechanisms. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because attacker-influenced input reaches an operating-system command interface without sufficiently restricting its semantics.

The underlying bug is insufficient validation of command-line arguments supplied to an externally executed program. The application permits options that have side effects beyond normal media playback, including file creation and interaction with Asterisk control mechanisms. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because attacker-influenced input reaches an operating-system command interface without sufficiently restricting its semantics.

Potential impact

  • An attacker may execute arbitrary commands as the Asterisk service user.
  • The attacker could modify application or service-owned files.
  • The vulnerability could enable creation of unauthorized Asterisk call files.
  • The compromise may support further movement within the PBX host or connected environment.
  • Voice services, call routing, or stored telephony data could be affected.
  • An attacker may execute arbitrary commands as the Asterisk service user.
  • The attacker could modify application or service-owned files.
  • The vulnerability could enable creation of unauthorized Asterisk call files.
  • The compromise may support further movement within the PBX host or connected environment.
  • Voice services, call routing, or stored telephony data could be affected.

General mitigation guidance

Mitigation generally focuses on treating player arguments as untrusted data and reducing the functionality available to configured media tools.

Common defensive patterns include:

  • Allowing only a narrowly defined set of playback options rather than passing arbitrary arguments.
  • Using structured process APIs with fixed executable paths and separately validated argument values.
  • Rejecting options that enable file writes, control channels, process execution, or other side effects unrelated to playback.
  • Separating configuration validation from command construction and applying validation before any process invocation.
  • Running the PBX service with the minimum filesystem, process, and operating-system privileges required.
  • Restricting administrator roles and protecting Music on Hold configuration from unnecessary modification.

Mitigation generally focuses on treating player arguments as untrusted data and reducing the functionality available to configured media tools.

Common defensive patterns include:

  • Allowing only a narrowly defined set of playback options rather than passing arbitrary arguments.
  • Using structured process APIs with fixed executable paths and separately validated argument values.
  • Rejecting options that enable file writes, control channels, process execution, or other side effects unrelated to playback.
  • Separating configuration validation from command construction and applying validation before any process invocation.
  • Running the PBX service with the minimum filesystem, process, and operating-system privileges required.
  • Restricting administrator roles and protecting Music on Hold configuration from unnecessary modification.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying concatenated or weakly validated command-line arguments passed to process-execution APIs.
  • Code review checks for allowlists that validate executable names but not their options or side effects.
  • Tests that submit boundary-case and unsupported player arguments and verify that process construction remains constrained.
  • Runtime monitoring for unexpected child processes, file creation, control-channel activity, or Asterisk call-file generation by the PBX service account.
  • Policy enforcement requiring approved executables and argument schemas for server-side media processing.

Automated security review tools may help identify unsafe command construction and incomplete argument validation.

Organizations can look for this class of issue through:

  • Static analysis rules identifying concatenated or weakly validated command-line arguments passed to process-execution APIs.
  • Code review checks for allowlists that validate executable names but not their options or side effects.
  • Tests that submit boundary-case and unsupported player arguments and verify that process construction remains constrained.
  • Runtime monitoring for unexpected child processes, file creation, control-channel activity, or Asterisk call-file generation by the PBX service account.
  • Policy enforcement requiring approved executables and argument schemas for server-side media processing.

Automated security review tools may help identify unsafe command construction and incomplete argument validation.

Sources

SourceLink
github.comgithub.com/FreePBX/music/commit/9f45605982202a34244ff22c4f635af0dfc1a733
github.comgithub.com/FreePBX/security-reporting/security/advisories/GHSA-p97w-rq48-p8q2

Frequently asked

questions

Exploitation depends on the FreePBX management interface being reachable and on the attacker possessing the required administrative access. It is not generally an unauthenticated attack.

An authenticated administrator, or another identity with equivalent ability to alter Music on Hold configuration, is generally required.

Restrict player arguments to a minimal, explicit allowlist and invoke fixed executables through structured process APIs that do not permit unintended options or side effects.

Treat all configurable command arguments as untrusted, test both executable names and options, monitor service-account behavior, and apply least-privilege controls to PBX processes.

Exploitation depends on the FreePBX management interface being reachable and on the attacker possessing the required administrative access. It is not generally an unauthenticated attack.

An authenticated administrator, or another identity with equivalent ability to alter Music on Hold configuration, is generally required.

Restrict player arguments to a minimal, explicit allowlist and invoke fixed executables through structured process APIs that do not permit unintended options or side effects.

Treat all configurable command arguments as untrusted, test both executable names and options, monitor service-account behavior, and apply least-privilege controls to PBX processes.

Find out what's already
exploitable in your codebase.