SignalWire FreeSWITCH is an open-source telephony platform used by developers and businesses to build scalable voice, video, and messaging applications. It provides a robust set of features for creating custom communication systems, including IVR, conferencing, and call routing. Organizations leverage FreeSWITCH for its flexibility and cost-effectiveness, enabling diverse telephony solutions ranging from small deployments to large-scale infrastructure. Businesses like contact centers and telecom companies often utilize FreeSWITCH to manage complex communication workflows. With its modular design, FreeSWITCH can be integrated with existing systems to enhance communication capabilities. The platform supports various protocols, allowing seamless interoperability with other software and devices.
The OS Command Injection vulnerability in SignalWire FreeSWITCH allows attackers to execute arbitrary operating system commands via an inbound SIP MESSAGE. This critical vulnerability exploits the 'api' chat interface, passing unauthorized commands to the switch_api_execute() function. By using a specifically crafted recipient of the form api+system , attackers can run with the privileges of the FreeSWITCH process, typically as root. The vulnerability is particularly dangerous because it allows remote execution of commands without proper authentication. This vulnerability is actively exploited due to the default credentials shipped with FreeSWITCH, making systems with the default settings highly susceptible. Addressing this vulnerability is crucial for maintaining the security and integrity of systems using FreeSWITCH.
Technical details of this vulnerability involve the manipulation of the sofia_presence_handle_sip_i_message function. Attackers can craft a SIP MESSAGE that abuses the '+' operator split to inject OS commands within the system. The default credentials allow attackers to authenticate and exploit this vulnerability without significant barriers. Vulnerable endpoints include SIP profiles that are chat-enabled, specifically those left unsecured with vanilla settings or empty-password defaults. The OS command is injected within the MESSAGE header as a chat protocol selector, leveraging the FreeSWITCH user's permissions. Once the crafted message is sent, the system returns a 202 Accepted response, indicating successful vulnerability exploitation.
Exploitation of this vulnerability can lead to severe consequences, including unauthorized access to system resources, data breach, and potential system compromise due to execution of arbitrary commands as root. Malicious actors could manipulate system configurations, install backdoors, or further propagate attacks within the network. Organizations might face data integrity issues, service disruptions, and increased risk of further exploits. The financial and reputational impact can be significant, especially for businesses relying on the affected systems for critical communication tasks. Immediate remediation measures are necessary to prevent potential exploitation and protect sensitive information.
REFERENCES
- Upgrade FreeSWITCH to version 1.11.3 or later to address the vulnerability.
- Disable the 'chat-api-proto' feature on SIP profiles that do not require chat functionality by setting enable-chat=false.
- Change default credentials such as 1000/1234 and ensure proper password policies are in place.
- Remove any users with empty-passwords and set allow-empty-password=false in configurations.
- Avoid running FreeSWITCH with root privileges to minimize potential risks from command execution.
- Restrict external access to SIP ports 5060/5061 to prevent unauthorized exploitation attempts.
Get AI-powered remediation steps tailored to your asset.
Try AI Solutions →