Skip to main content
Menu
Advisories

Client-selected V1 serializer crashes shared broadcast dispatch on binary payloads

GHSA-5VMC-QGF8-RW36Published Updated GitHub

Description

If a Phoenix application makes binary broadcasts ({:binary, data}) on a topic, any client that connects without a vsn param (or with vsn=1.0.0) can cause broadcasts to fail, leading to missed messages. Cross-node broadcasts can wipe the node's PubSub subscriptions.

Impact

This is a remote denial of service. It affects any Phoenix app that broadcasts binary payloads on topics untrusted clients can join. The attacker needs no privileges beyond joining the channel, and in clustered deployments the effect spreads node-wide.

Mediation

Users are recommended to upgrade immediately. If they cannot, they can reject earlier version serializers by explicitly listing the supported protocols on the socket:

socket "/socket", MyAppWeb.UserSocket,
  websocket: [serializer: [{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}]],
  longpoll: [serializer: [{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}]]

Affected versions

References

GitHub · phoenixframework/phoenix