Skip to content
Prototype pollution Disclosed report Intermediate

Jitsi: Bridge Message Spoofing due to Improper JSON Handling leads to Prototype Pollution

The Jitsi VideoBridge accepted JSON messages with duplicate colibriClass keys, letting a participant send a message that the bridge treated as an allowed type but clients interpreted as a server-only control message. This allowed unauthorised actions such as swapping video sources or causing denial of service against targeted participants.

afewgoats Follow

Originally disclosed on HackerOne

  • Triaged in 17 hours
  • Fixed in 25 days
  • Paid in 12 days
  • Disclosed after 13 months

Summary by the program

The Jitsi VideoBridge failed to properly handle JSON messages with duplicate colibriClass keys, enabling clients to send messages interpreted differently by the bridge and resulting in unauthorized actions within video conferences.

Jitsi Security Advisory has been published: https://github.com/jitsi/security-advisories/blob/master/advisories/JSA-2023-0001.md

Changes:

We thank @afewgoats for submitting this report to us.

Summary by the researcher

Video call participants use a WebSocket to send and receive JSON messages via the Jitsi Videobridge. Participants can only send certain message types (endpoint statistics). The other message types (e.g. set video sources and other control messages) can only be sent by the server.

This vulnerability allowed participants to send any message type by sending JSON containing a duplicate key.

JSON
{"colibriClass":"EndpointStats","colibriClass":"ForwardedSources",...}

Videobridge, using Jackson, determines the message type from the first colibriClass value. If it is an allowed type, the message is forwarded to participants. Upon receiving the forwarded message, the clients, parsing JSON with JavaScript, determine the message type from the last colibriClass value and act on it. This may be a server-only message type.

Overall, while it's a fun bug, the impact was mainly limited to DoS against targeted participants and swapping video sources around.

The original report as published on HackerOne, by afewgoats. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the bridge and the clients parsed JSON with different duplicate-key handling: the bridge used the first colibriClass value while JavaScript clients used the last, so the same message was classified differently.

Impact

The impact was mainly limited to denial of service against targeted participants and swapping video sources around.

What the attacker needed

A participant account in a Jitsi conference; WebSocket access to the bridge

The fix

The projects were fixed by switching to a safe JSON parser and cleaning up the bridge message type handling.

How it was found

  1. Join a video conference as a participant and connect to the bridge over WebSocket.
  2. Send a JSON message containing two colibriClass keys, the first an allowed type and the second a server-only type.
  3. The bridge accepts the message as the allowed type and forwards it to other participants.
  4. The clients parse the message and act on the last colibriClass value, performing the server-only action.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

In a video call, the bridge normally only lets ordinary participants send a limited kind of message, while control messages come from the server. Here, a participant could craft a message that looked harmless to the bridge but was read as a control command by other people's apps, because the two sides disagreed about which of two identical field names to use.

What is Prototype pollution?

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.

More by afewgoats

View all

2 more disclosed reports, best first.

More from 8x8

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Prototype pollution

The lesson behind this report.

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.