Pipecat Telephony Runner Unauthenticated Call-Control Abuse
An unauthenticated remote attacker can leverage a missing authorization vulnerability (CWE-862) in the Pipecat development runner's `/ws` WebSocket endpoint to supply a crafted `callSid` in a handshake message, compelling the server to use its configured Twilio, Telnyx, or Plivo credentials to issue authenticated API requests that terminate active calls, resulting in denial of service and credential abuse.
A missing authorization vulnerability (CWE-862) affects the pipecat development runner, specifically its telephony WebSocket /ws endpoint. An unauthenticated remote attacker who can reach an exposed pipecat runner can connect to this endpoint, which accepts connections without any authentication. By sending a crafted Twilio WebSocket handshake message containing an attacker-supplied callSid (e.g., CAATTACKER1337INJECTED00000000001), the attacker can trick the server. The runner will then issue an authenticated Twilio REST API hang-up request against that callSid using the server operator's own TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN credentials. Similar vulnerabilities exist for Telnyx and Plivo. Although designed for development and defaulting to localhost, pipecat runners are often exposed publicly via proxies for telephony provider callbacks, creating a critical attack surface for call disruption and credential abuse.
Attack Chain
- An unauthenticated remote attacker identifies an exposed
pipecatdevelopment runner with an accessible/wsWebSocket endpoint, typically fronted by a public proxy. - The attacker establishes an unauthenticated WebSocket connection to the
/wsendpoint on thepipecatrunner. - The attacker sends a crafted Twilio WebSocket "start" handshake message, embedding an attacker-controlled
callSid(e.g.,CAATTACKER1337INJECTED00000000001) into the JSON payload. - The
pipecatrunner, lacking authentication checks, accepts the connection and extracts the attacker-suppliedcallSidfrom the handshake message without validation. - When the
pipecatpipeline terminates (e.g., via anEndFrameorCancelFrame), itsTwilioFrameSerializer(which defaultsauto_hang_uptoTrue) automatically triggers the_hang_up_call()function. - The
_hang_up_call()function constructs a Twilio REST API URL, incorporating the attacker-suppliedcallSidinto the endpoint (e.g.,api.twilio.com/.../Calls/{attacker_call_sid}.json). - The
pipecatrunner then uses its own configuredTWILIO_ACCOUNT_SIDandTWILIO_AUTH_TOKEN(from environment variables) to send an authenticated POST request to the constructed Twilio API URL. - This POST request forcibly terminates the call associated with the attacker-supplied
callSid, leading to denial of service or abuse of the operator's telephony account.
Impact
This vulnerability, categorized as Missing Authorization (CWE-862), allows an unauthenticated network attacker to remotely interact with an exposed pipecat development runner. If the runner is configured with live Twilio, Telnyx, or Plivo credentials, the attacker can forcibly terminate active calls by injecting a known or guessed callSid into the WebSocket handshake. This leads to denial of service for ongoing communications and enables the attacker to abuse the organization's telephony provider credentials for unauthorized call-control actions. Organizations relying on pipecat for telephony integrations that have inadvertently exposed development instances to the public internet are at risk of significant operational disruption and potential compromise of their telephony accounts.
Recommendation
- Review
pipecatrunner deployments: Ensurepipecatdevelopment runners are strictly bound tolocalhostor internal, trusted network interfaces, and are not accessible from untrusted networks, as highlighted in theOverview. - Network Monitoring and Blocking: Monitor outbound connections from
pipecatrunner hosts to telephony API endpoints such asapi.twilio.com,api.telnyx.com, andapi.plivo.com(listed in IOCs), and implement network filtering or segmentation to restrict such traffic unless explicitly required and carefully configured. - Detection Engineering: Deploy the Sigma rule "Pipecat Telephony Runner Outbound Call Control Request" from this brief to your SIEM and tune it to identify anomalous outbound call termination requests originating from pipecat processes.
Detection coverage 1
Pipecat Telephony Runner Outbound Call Control Request
highDetects outbound network connections from a process associated with the pipecat telephony runner (Python) to Twilio, Telnyx, or Plivo API endpoints with URL patterns indicative of call termination. This could suggest exploitation of the unauthenticated call-control vulnerability.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
3
domain
| Type | Value |
|---|---|
| domain | api.twilio.com |
| domain | api.telnyx.com |
| domain | api.plivo.com |