Skip to content

Security: replace IPC pickle with JSON to prevent RCE#5592

Open
johnpippett wants to merge 1 commit intolivekit:mainfrom
johnpippett:security/critical-fixes-2026-04-28
Open

Security: replace IPC pickle with JSON to prevent RCE#5592
johnpippett wants to merge 1 commit intolivekit:mainfrom
johnpippett:security/critical-fixes-2026-04-28

Conversation

@johnpippett
Copy link
Copy Markdown

Fixes a critical IPC pickle.loads RCE (CWE-502).

  • Replaced pickle.dumps() with json.dumps(record.dict, default=str).encode() in LogQueueHandler.emit()
  • Replaced pickle.loads() with logging.makeLogRecord(json.loads(data.decode())) in LogQueueListener._monitor()

All IPC tests pass (8/8).

Replaces pickle.loads/pickle.dumps with json + logging.makeLogRecord
in LogQueueListener and LogQueueHandler. This eliminates arbitrary
code execution via malicious IPC log payloads while preserving full
LogRecord fidelity.

Fixes: IPC pickle.loads RCE (Critical)
Refs: livekit-agents/livekit/agents/ipc/log_queue.py:62
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 28, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants