CVE-2026-116779: The SIP MESSAGE That FreeSWITCH Runs as a Command
The advisory for CVE-2026-116779 says that a SIP MESSAGE can make FreeSWITCH execute commands with the privileges of its own process: arbitrary OS commands, disclosure of configuration and credentials, full call control. It is rated CVSS 9.8, it has been exploited in the wild, and it was added to CISA’s Known Exploited Vulnerabilities catalog on 2026-11-09.
I reproduced the first part of that on 2026-11-14, on FreeSWITCH 1.11.2 built from the upstream tag. One MESSAGE whose To header starts with api+system ran id; hostname on the target as the service user, and the target sent me the output in a SIP MESSAGE of its own. I used no secret: a vanilla install ships a directory user called default with no password, and that account is enough to pass MESSAGE authentication. FreeSWITCH 1.11.3 answers the same MESSAGE with 403 Forbidden. I did not read configuration files, I did not touch a call, and I did not run the exploit over UDP.
This is a reproduction of a disclosed bug, not a discovery. What I add is the material to check it yourself: a PoC that is one Python file and speaks SIP without a library, a lab that builds both versions from source, a live capture and experimental Suricata and Sigma rules. The runs also turned up four things a defender should know. The account that needs no password. Three different API commands through the same hole. An external profile that executes the command without telling the sender. And a stock log that says nothing at all about a successful exploit.
Repo with the PoC, the lab, the capture and the rules: al4n4n/achilles-heel/CVE-2026-116779.
The target: MESSAGE, profiles and chat interfaces
FreeSWITCH is an open-source telephony platform, and SIP is how most of the outside world talks to it. The SIP side lives in mod_sofia, which runs one or more profiles. The vanilla configuration has two, internal on port 5060 and external on port 5080.
SIP is not only calls. MESSAGE is the method for instant messages: a request with a From, a To and a body. FreeSWITCH accepts it on any profile that has chat enabled, and chat is enabled by default on both stock profiles. Since 1.10.7 the sender also has to pass Digest authentication first, by default.
Inside the server, a message is handed to a chat interface. Modules register these under a name, and the name decides who gets the message. sip delivers to a registered SIP user. mod_dptools registers one called api, and that one does not deliver anything: it takes the destination address, runs it as a FreeSWITCH API command, and sends the command’s output back to the sender as a message. The API includes global_getvar, which reads a global variable, lua, which runs Lua, and system, which runs a shell command.
So the server has, by design, a messaging endpoint that executes commands. The question for this CVE is who can address a message to it.
The advisory gives no figure for exposed servers and I have none, so I give none. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, and the SSVC assessment recorded for the CVE is exploitation active, automatable, total impact.
The split at the plus sign
The answer is in sofia_presence_handle_sip_i_message(), the function in mod_sofia that receives every inbound MESSAGE. I found it by reading the fix commit and following the call chain in the v1.11.2 tree. These are the lines that matter, each quoted on its own with its place in that tree. They are not one contiguous listing; the links go to the full code.
1 | src/mod/endpoints/mod_sofia/sofia_presence.c |
to_user is the user part of the To header. If it contains a + that is not its first character, the handler cuts it there. The left half is copied into proto. The right half becomes the destination address. About 140 lines later the handler calls switch_core_chat_send(proto, event), and the core looks up a chat interface with that name and calls it.
What the code should do is decide for itself which chat interface an inbound SIP message goes to. What it does is let the To header decide. Nothing between line 4874 and line 5018 limits which name a SIP peer may put on the left of the +.
Now name api. api_chat_send() URL-decodes the address, splits it at the first space, and calls switch_api_execute() with the two halves as command and argument. Then it sends whatever the command wrote back through the sip chat interface, to the address the MESSAGE came from. With system as the command, mod_commands passes the argument to a shell.
Put together: a MESSAGE with To: <sip:api+system%20id@domain> runs id on the server, and the server posts the result back.
What an attacker needs
Four conditions, three for execution and one for comfort.
- A SIP MESSAGE reaches a profile with chat enabled. That is the default.
- The sender passes MESSAGE authentication. That is on by default too.
- The user part of the To header starts with
api+. The Request-URI does not matter here, becauseto_usercomes from the To header. The compare ignores case and happens after sofia-sip has unescaped the user part, a detail that comes back in the detection section. - To receive the output, the sender has to be registered on the
internalprofile under the From address it uses. Without a registration the command still runs. Only the reply is dropped.
The second condition looks like it should end the “no privileges required” story. On a vanilla install it does not. conf/vanilla/directory/default/default.xml ships a user named default that has no parameters and no password, and sofia_reg_parse_auth() returns AUTH_OK for it. The Digest handshake still takes place on the wire. The client still computes a response. The password that goes into the hash is the empty string.
I call that “no secret” and not “no authentication”, because the two are different claims. An install without the default user, or with allow-empty-password=false, does not have this door, and I did not test one. What I did test is that an ordinary account works just as well: any user that may send a MESSAGE can address one to api.
A target that does not come as an image
The first obstacle was mundane. I found no official FreeSWITCH Docker image to pull, so setup.py builds both versions from the upstream tags in a Debian bookworm container: v1.11.2 at commit 3f13ad1b1d32 and v1.11.3 at ef32e205295e. The build stops unless git rev-parse HEAD and git describe --tags --exact-match agree with those pins. sofia-sip and spandsp come from the FreeSWITCH forks, pinned by commit as well. On a 16-core machine the first image took 150 seconds and the second 90.
A source build of a telephony server wants a lot of libraries, and I did not give it all of them. mod_av, mod_signalwire and mod_verto are left out because they need ffmpeg, libks and signalwire-c. None is on the path of this bug. It does mean that the sibling fix for mod_verto cannot be tested in this lab, and I make no claim about it. The stock vars.xml asks a public STUN server for the external address at start-up, and a lab with a known-vulnerable service should not be calling third parties, so both values point at the local address. FreeSWITCH runs as the user freeswitch, as the distribution packages run it. A source install started as root would run the attacker’s commands as root.
One deviation shapes everything that follows. The lab publishes SIP on 127.0.0.1 of the Docker host only, and my laptop reaches it through an ssh port-forward. ssh forwards TCP. So every exploit run in this post is SIP over TCP. Stock FreeSWITCH listens on UDP as well, on the same ports, and I did not run the exploit over UDP.
setup.py prints what it started, so the run itself shows the versions (evidence/setup.txt):
1 | [+] vulnerable FreeSWITCH version: 1.11.2-release+git~20260809T162310Z~3f13ad1b1d~64bit (git 3f13ad1 2026-08-09 16:23:10Z 64bit) |
The two enable-chat-api-proto lines are a cheap sanity check. The fix introduces a profile parameter with that name. The string is absent from mod_sofia.so in the 1.11.2 build and present in 1.11.3, where the shipped profile mentions it only in a comment.
Walking one run
poc.py does everything on one TCP connection, and capture/exploit.pcap in the repository is that connection, recorded live on the target’s network interface. It has 28 packets and spans 63 milliseconds.
OPTIONS, no credentials. The server answers 200 OK with a User-Agent of FreeSWITCH-mod_sofia/1.11.2-release[...] and a Contact of sip:172.31.79.12. That gives the version and the SIP domain. It is also everything check.py does: one OPTIONS, a verdict from the banner, and no MESSAGE. The check says “confidence: medium” and never more, because a banner can be changed and it cannot see the profile’s settings.
REGISTER as default. The server answers 401 with a Digest challenge, the PoC answers the challenge with an empty password, and the server says 200 OK. Why register at all, if the bug is in MESSAGE? Because of where the output goes. api_chat_send() replies through the sip chat interface, and that interface finds its destination by looking the address up in the internal profile’s registrations. No registration, no reply. I want the reply, because the reply is the proof.
MESSAGE, twice. The first one carries no credentials and gets 407 Proxy Authentication Required. The second is the same request with a Proxy-Authorization header for default, and the server answers 202 Accepted. In the capture these are packets 14, 15, 17 and 19. Packet 17 is the trigger.
Inside the server. The handler splits the To user, finds api, and hands over the rest. I cannot show this step directly on the vulnerable build, because it logs nothing on this path. I see it by what happens next, and by what the patched build does at the same place.
MESSAGE, from the server. Packet 20 is a new request, from the target to my registered contact. Its From address is the api+system... address I wrote into the To header. Its body is the output of my command.
The proof
The command the PoC sends is benign: id; hostname; echo <marker> | tee <file in /tmp>. The marker contains an arithmetic expression, $((9260*3427)) in this run. The PoC sends the expression as text. Only a shell can turn it into a number, so a reply that contains the product was produced by a shell on the target. This is run 5cdca241 (evidence/poc-vulnerable.txt):
1 | [3] Round 1/1, the trigger. MESSAGE to the `api` chat proto |
Read it from the top. The To user decodes to an API command line, system followed by a shell command. The PoC percent-encodes every character that is not a letter or a digit, which is why the request line is so hard on the eyes. The server accepts the MESSAGE and, a few milliseconds later, sends one back. Its From header is the server’s own rendering of the address I sent, already unescaped. X-FS-Sending-Message is a FreeSWITCH-specific header, and it turns out to be a useful one for detection. Then the body: the id of the service user, the container’s hostname, and 31734020, which is 9260 times 3427.
The body is evidence from the target, but it arrived through my own script. So I also looked from the other side. This is the file the command wrote, read from inside the container after the run (evidence/target-marker-vulnerable.txt):
1 | [*] Marker files inside cve-2026-116779-vulnerable: |
The file’s timestamp is 12:39:34.453 by the lab host’s clock. In the capture, the trigger is at 12:39:34.450 and the reply at 12:39:34.454. The file was written in the four milliseconds between them.
Five rounds out of five returned output (evidence/poc-vulnerable-rounds5.txt). There is no race to win here. It is a logic flaw and it fires every time.
The negative control
The same script, the same MESSAGE, against FreeSWITCH 1.11.3 (evidence/poc-patched.txt):
1 | [*] API command the To user decodes to: system id; hostname; echo cve-2026-116779-b1d084f4-$((3115*9321)) | tee /tmp/cve-2026-116779-b1d084f4.txt |
No marker file exists on the patched target (evidence/target-marker-patched.txt), and the server wrote down what it refused (evidence/freeswitch-patched.log, line 1227):
1 | 2026-11-14 12:40:02.520553 99.73% [WARNING] sofia_presence.c:4884 Profile [internal] rejected a MESSAGE from default@172.31.79.13 (172.31.79.1:54348) addressed to the 'api' chat proto [system%20id;%20hostname;%20echo%20cve-2026-116779-b1d084f4-$((3115*9321))%20%7C%20tee%20/tmp/cve-2026-116779-b1d084f4.txt]. Set enable-chat-api-proto=true on the profile to permit it. |
That log line also closes the one step I could not see on 1.11.2. It comes from sofia_presence.c:4884, a few lines below the split, and it quotes my command as the thing addressed to the api chat proto. The fixed build stops exactly where the vulnerable build went on.
Not only system
system is the loudest API command, not the only one. The PoC takes any API command line with --api. A configuration variable (evidence/poc-vulnerable-api-getvar.txt):
1 | [*] API command the To user decodes to: global_getvar default_password |
1234 is the stock value of default_password. That is one global variable, read back over SIP. I did not go further into configuration files or the user directory, so the advisory’s “disclosure of configuration and credentials” is shown here only to that extent.
Inline Lua, where mod_lua is loaded, which it is in the stock configuration (evidence/poc-vulnerable-api-lua.txt):
1 | [*] API command the To user decodes to: lua ~stream:write(_VERSION .. ' ' .. io.popen('id'):read('*a')) |
The script asks for _VERSION and for io.popen('id'). Both come back. This matters for anyone who thinks of mitigating by removing system: the Lua standard library is a second way to the shell.
And the passwordless account is a convenience, not a requirement. With --user 1000 --password 1234, a stock directory user with the stock password, the result is the same as with default (evidence/poc-vulnerable-user1000.txt).
The run that looked like a miss
Then I pointed the PoC at port 15080, the external profile of the vulnerable target. This is what came back (evidence/poc-vulnerable-external.txt):
1 | [*] The server answered the MESSAGE: SIP/2.0 202 Accepted |
202 Accepted, then silence, and my own script reports that it observed no impact. Taken alone, that output says the external profile is not exploitable. The target tells a different story. The marker file of that run is there (evidence/target-marker-vulnerable-after-external.txt):
1 | -rw-r--r-- 1 freeswitch freeswitch 34 2026-11-14 12:40:34.292337410 +0000 /tmp/cve-2026-116779-1a507843.txt |
And this time the server log has something to say (evidence/freeswitch-vulnerable-after-external.log):
1 | 2026-11-14 12:40:34.282469 99.73% [WARNING] sofia_presence.c:221 Not sending to local box for default@172.31.79.12 |
The command ran. FreeSWITCH then tried to send the output, looked for the destination among the registrations of the internal profile, found nobody to send to, and logged the whole reply as an error: the command, the id output, the marker, and “Nobody to send to”.
So the external profile gives blind execution. An attacker gets no output on that connection, and does not need any. I did not try the combination of registering on internal and triggering on external, so I cannot say whether the output can be recovered that way.
The quiet log
That error is the only thing the vulnerable server ever logged about any of this, and it logged it because the exploit half failed.
After the main run, the one where the reply was delivered, the target’s freeswitch.log has no line about the MESSAGE, none about the API command, none about the shell (evidence/freeswitch-vulnerable.log). The only line it gained during the run is mod_voicemail.c:4068 Event Thread Started, which says nothing about a MESSAGE or a command. This holds for the stock log settings of my lab build, and I did not try others.
For incident response that is uncomfortable. On a vulnerable server, the clean exploit is the invisible one. If you find Chat proto [api] errors in a 1.11.2 log, you are looking at the attempts that could not deliver their output, and each of those lines contains the command and what it printed.
What this shows, and what it does not
| Claim | Status |
|---|---|
OS command execution on 1.11.2 through a MESSAGE to api+system, output returned over SIP, no secret used |
Proven |
1.11.3 rejects the same MESSAGE with 403 Forbidden, logs it, and nothing runs |
Confirmed |
Other API commands run too: global_getvar default_password returned the target’s value |
Proven |
Inline Lua through mod_lua with the standard library (io.popen) |
Proven |
An ordinary account (stock user 1000) works like default |
Proven |
The external profile of 1.11.2 accepts the MESSAGE and runs the command blind |
Proven on the target side only |
The external profile of 1.11.3 answers 403 Forbidden |
Confirmed |
A successful exploit with a delivered reply leaves no line in the stock freeswitch.log |
Proven for this lab’s stock log settings |
| Reading configuration files and credentials beyond one global variable; call control | Not reached: not attempted |
| The exploit over UDP | Not reached: not attempted, the lab publishes TCP only |
Output returned when the trigger goes to the external profile |
Not reached: one run, reply dropped; registering on internal first was not tried |
| The exploit with no account at all | Not reached: not attempted |
The mod_verto route, which has its own fix |
Not reached: mod_verto is not built in this lab |
Proven means the evidence file is in the repository. Confirmed means the negative control was run. Not reached means not shown here. It does not mean not possible. The README has the same table with a file for every row.
The advisory says command execution with the privileges of the FreeSWITCH process. For OS commands, that is what I saw. The rest of its list I did not test.
Detection
The repository ships three Suricata rules and one Sigma rule. All four are experimental / minimally validated. Each passed its validator, fired on the canonical artifact and stayed quiet on one benign fixture, and that is the whole of the testing. I ran no payload variations and measured no false-positive rate.
The Suricata rules look at SIP over TCP. Two match an inbound MESSAGE with api+ or api%2B in the To header. The third matches the reply: an outbound MESSAGE with X-FS-Sending-Message and api+ in its From header, which means a command ran and its output left the building. On the exploit capture they give three alerts, and none on a capture of an ordinary OPTIONS, REGISTER and MESSAGE exchange.
The Sigma rule reads freeswitch.log and matches two lines you have already seen in this post: the rejection warning of the fixed build and the Chat proto [api] error of the vulnerable build.
Know the limits before you rely on any of it.
- The selector can be spelled in ways the rules do not cover. The server unescapes the To user before it compares, and it ignores case. The rules cover the literal
api+andapi%2B. They do not cover percent-encoded letters such as%61pi+. - TCP only. The rules are written and tested for TCP. FreeSWITCH also listens on UDP, and the UDP variants were not tested.
- The log rule is blind to the clean exploit. A delivered reply leaves no log line on a vulnerable build, so the Sigma rule sees only failed deliveries and patched servers. On a vulnerable server you need the network view.
- Plaintext only. SIP over TLS needs decryption in front of the sensor.
The rules, their documentation and the test commands are in detection/.
The fix
The fix is one condition in the right place. In v1.11.3, directly after the split:
1 | src/mod/endpoints/mod_sofia/sofia_presence.c |
If the sender named api and the profile does not carry the new flag, the handler logs the warning shown above, answers 403 Forbidden and returns. The flag is set by a new profile parameter, enable-chat-api-proto. It is off unless set, and the vanilla profiles ship it commented out.
It works because it moves the decision back to the operator. Whether a SIP peer may reach the API through a message is now a property of the profile, and the To header no longer decides it. The gate is specific to the name api. I did not look at what other chat interfaces a peer can name, and the parameter cuts both ways: on a fixed build with enable-chat-api-proto=true, a profile runs API commands from MESSAGE by design.
For operators the fix is the update to 1.11.3. Removing the passwordless default user is worth doing, but it closes only the no-secret path, because any account that may send a MESSAGE is enough on a vulnerable build.
Advisory and fix
| Date | Event |
|---|---|
| 2026-08-28 | Commit date of the v1.11.3 tag, the first fixed release, as the build prints it in its version string |
| 2026-11-09 | Added to CISA’s Known Exploited Vulnerabilities catalog |
| 2026-11-14 | My reproduction runs (UTC) |
The fix is commit 7015f6a73ab3, PR #3135. The table holds only the dates I can source. The advisory is GHSA-mg63-h38w-8p9p. It lists FreeSWITCH 1.11.2 and earlier as affected and credits Örn Arnarson as reporter and Gunnlaugur as analyst.
Reproduce it
You need Python 3 and Docker on a Linux x86_64 host with about 3 GB of free disk. If Docker is on another machine, add --lab-host user@host to the setup.py commands and the lab runs there, reached through an ssh port-forward. That is the mode every run in this post used.
1 | git clone https://github.com/al4n4n/achilles-heel.git && cd achilles-heel/CVE-2026-116779 |
check.py answers VERDICT: VULNERABLE for the first target without sending a MESSAGE. The first poc.py run ends in RESULT: VULNERABLE. OS command execution through SIP MESSAGE observed. Exit 0. The second, against 1.11.3, ends in RESULT: impact NOT observed. Exit 1. The README lists every step with its expected output, and evidence/INDEX.md lists every evidence file with the command that produced it and the claim it supports. Run it only against the lab.
References
- Repository: al4n4n/achilles-heel/CVE-2026-116779
- Advisory: GHSA-mg63-h38w-8p9p
- Fix commit: 7015f6a73ab3, PR #3135
- Vulnerable function:
sofia_presence_handle_sip_i_message()at tag v1.11.2 - The
apichat interface:api_chat_send()at tag v1.11.2