Overview

FreeSWITCH is a software-defined telecom stack that processes SIP traffic. The vulnerability resides in the sofia_presence_handle_sip_i_message() routine, which incorrectly parses the To user of inbound SIP MESSAGE requests. By splitting on a plus sign, the left side is treated as a chat protocol selector, and choosing the API protocol triggers execution of FreeSWITCH API commands. The issue is present in the default internal and external profiles where inbound chat is enabled, and any authenticated profile account—or a directory account without a password—can be used to exploit the flaw.

Technical details

When an inbound SIP MESSAGE contains a To header with a plus (+) sign, the function splits the user portion and interprets the left side as a chat protocol selector. Selecting the 'api' protocol causes the code to call switch_api_execute(), which runs any FreeSWITCH API command supplied in the message body. Because the daemon runs with elevated privileges, commands that invoke operating-system shells can be executed. Exploitation requires inbound chat to be enabled (the default on internal and external profiles) and either an authenticated profile account or a directory user lacking a password to send the crafted MESSAGE.

Impact

An attacker who can send a SIP MESSAGE to a vulnerable FreeSWITCH instance can execute arbitrary FreeSWITCH API commands and, through command-sink APIs, run operating-system commands with the privileges of the FreeSWITCH daemon. This enables configuration and credential disclosure, arbitrary call control, and full system command execution. Any deployment using the default profiles and not patched to 1.11.3 is exposed.

Recommended actions

  • Apply the update to FreeSWITCH 1.11.3 or later.
  • Restrict inbound SIP MESSAGE traffic to trusted sources.
  • Disable inbound chat on internal and external profiles if it is not required.
  • Review and remove directory users that lack passwords.
  • Monitor for unexpected FreeSWITCH API command executions and OS command activity.

Detection

Inspect FreeSWITCH logs for sofia_presence_handle_sip_i_message entries that contain a plus sign in the To header and track any use of the 'api' chat protocol. Correlate these events with subsequent switch_api_execute calls and look for execution of system commands. Alert on sudden spikes in SIP MESSAGE volume or on API commands that invoke shell utilities. Regularly audit profile configurations for enabled inbound chat.

Reference: NVD entry for CVE-2026-116779