/

CVE-2026-116786

Severity:

HIGH RISK

(8.8)

Command Injection (CWE-77) in FreeSWITCH SIP REFER Handler

CVE-2026-116786

Undergoing Analysis

Vulnerability type

Category:

Command Injection

CWE:

CWE-77, CWE-94

Impact:

Operating-system 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

FreeSWITCH could interpret attacker-controlled SIP REFER data as channel-variable separators when building parameters for a new call leg. A registered caller on a bridged call that takes the off-box transfer path could use this behavior to trigger operating-system command execution with the FreeSWITCH process's privileges.

FreeSWITCH could interpret attacker-controlled SIP REFER data as channel-variable separators when building parameters for a new call leg. A registered caller on a bridged call that takes the off-box transfer path could use this behavior to trigger operating-system command execution with the FreeSWITCH process's privileges.

Affected context

The issue occurs in FreeSWITCH's SIP REFER handling, where raw Refer-To URI parameters and headers are placed into a channel-variable block passed to the originate parser. Deployments may be at risk when SIP REFER is enabled and a caller can take the off-box transfer path; the parser can treat commas in attacker-controlled values as variable separators.

The issue occurs in FreeSWITCH's SIP REFER handling, where raw Refer-To URI parameters and headers are placed into a channel-variable block passed to the originate parser. Deployments may be at risk when SIP REFER is enabled and a caller can take the off-box transfer path; the parser can treat commas in attacker-controlled values as variable separators.

Exploit preconditions

  • Attack surface: SIP REFER handling during a bridged call
  • Required access: A registered account and the ability to make a call that takes the off-box transfer path
  • Trigger point: Processing Refer-To URI parameters or headers while originating a new call leg
  • Why exploitation is possible: Attacker-controlled values are inserted into a variable block without safely separating or neutralizing parser delimiters, allowing injected variables to influence pre-answer behavior
  • Attack surface: SIP REFER handling during a bridged call
  • Required access: A registered account and the ability to make a call that takes the off-box transfer path
  • Trigger point: Processing Refer-To URI parameters or headers while originating a new call leg
  • Why exploitation is possible: Attacker-controlled values are inserted into a variable block without safely separating or neutralizing parser delimiters, allowing injected variables to influence pre-answer behavior

Why this happens

FreeSWITCH places raw SIP REFER data into a string that is later parsed as channel variables. Because the originate parser treats commas as variable separators, untrusted input can introduce additional variables, including one that invokes a dialplan application before answer. This is an injection flaw in the construction and parsing of command-related input, mapping to CWE-77: Improper Neutralization of Special Elements used in a Command; the resulting command-execution behavior is also related to CWE-94: Improper Control of Generation of Code.

FreeSWITCH places raw SIP REFER data into a string that is later parsed as channel variables. Because the originate parser treats commas as variable separators, untrusted input can introduce additional variables, including one that invokes a dialplan application before answer. This is an injection flaw in the construction and parsing of command-related input, mapping to CWE-77: Improper Neutralization of Special Elements used in a Command; the resulting command-execution behavior is also related to CWE-94: Improper Control of Generation of Code.

Potential impact

  • An attacker could execute operating-system commands with the privileges of the FreeSWITCH process.
  • The attacker may gain control over or disrupt the affected FreeSWITCH service.
  • Sensitive data accessible to the service could be exposed or altered.
  • A compromised service could be used as a foothold for further activity, depending on its permissions and network access.
  • An attacker could execute operating-system commands with the privileges of the FreeSWITCH process.
  • The attacker may gain control over or disrupt the affected FreeSWITCH service.
  • Sensitive data accessible to the service could be exposed or altered.
  • A compromised service could be used as a foothold for further activity, depending on its permissions and network access.

General mitigation guidance

Defensive approaches focus on preventing untrusted SIP data from becoming parser syntax or executable behavior:

  • Build originate parameters using structured APIs or safe encoding rather than concatenating raw values.
  • Validate and constrain Refer-To parameters and headers against an explicit schema and allowlist.
  • Keep SIP input untrusted across parsing and call-origination boundaries; do not rely solely on later validation.
  • Avoid invoking command-capable dialplan behavior from attacker-influenced variables.
  • Run FreeSWITCH with only the operating-system and network privileges it needs, limiting potential impact if a parsing flaw is reached.

Defensive approaches focus on preventing untrusted SIP data from becoming parser syntax or executable behavior:

  • Build originate parameters using structured APIs or safe encoding rather than concatenating raw values.
  • Validate and constrain Refer-To parameters and headers against an explicit schema and allowlist.
  • Keep SIP input untrusted across parsing and call-origination boundaries; do not rely solely on later validation.
  • Avoid invoking command-capable dialplan behavior from attacker-influenced variables.
  • Run FreeSWITCH with only the operating-system and network privileges it needs, limiting potential impact if a parsing flaw is reached.

How teams detect issues like this

  • Use static analysis to identify raw SIP-derived values concatenated into originate strings or channel-variable blocks.
  • Review SIP REFER handling for delimiter interpretation, variable injection, and paths that invoke command-capable dialplan applications before answer.
  • Apply code-review and CI policies that require structured parameter construction and validation at trust boundaries.
  • Monitor for unexpected pre-answer dialplan execution or unusual process activity associated with FreeSWITCH.
  • Use static analysis to identify raw SIP-derived values concatenated into originate strings or channel-variable blocks.
  • Review SIP REFER handling for delimiter interpretation, variable injection, and paths that invoke command-capable dialplan applications before answer.
  • Apply code-review and CI policies that require structured parameter construction and validation at trust boundaries.
  • Monitor for unexpected pre-answer dialplan execution or unusual process activity associated with FreeSWITCH.

Sources

SourceLink
github.comgithub.com/signalwire/freeswitch/commit/fbac12b451a146fdac5104d25d337145be989e84
github.comgithub.com/signalwire/freeswitch/releases/tag/v1.11.2
github.comgithub.com/signalwire/freeswitch/security/advisories/GHSA-xjxm-9qx6-w3fj

Frequently asked

questions

A registered caller may be able to exploit it when making a bridged call that takes the off-box transfer path. Administrative or Event Socket access is not required.

Yes. SIP REFER is enabled by default according to the vulnerability description, but deployment settings and call routing affect whether the required transfer path is reachable.

Avoid placing raw SIP-derived values into parser-delimited variable strings. Use structured parameter APIs, validate inputs, and prevent attacker-controlled variables from invoking command-capable behavior.

Treat protocol input as untrusted at every processing boundary, review string construction for parser metacharacters, enforce least privilege, and include static checks and security-focused code review in development workflows.

A registered caller may be able to exploit it when making a bridged call that takes the off-box transfer path. Administrative or Event Socket access is not required.

Yes. SIP REFER is enabled by default according to the vulnerability description, but deployment settings and call routing affect whether the required transfer path is reachable.

Avoid placing raw SIP-derived values into parser-delimited variable strings. Use structured parameter APIs, validate inputs, and prevent attacker-controlled variables from invoking command-capable behavior.

Treat protocol input as untrusted at every processing boundary, review string construction for parser metacharacters, enforce least privilege, and include static checks and security-focused code review in development workflows.

Find out what's already
exploitable in your codebase.