{"affected":[{"package":{"ecosystem":"Hex","name":"phoenix","purl":"pkg:hex/phoenix"},"ranges":[{"events":[{"introduced":"1.5.7"},{"fixed":"1.5.16"}],"type":"SEMVER"},{"events":[{"introduced":"1.6.0-rc.0"},{"fixed":"1.6.18"}],"type":"SEMVER"},{"events":[{"introduced":"1.7.0-rc.0"},{"fixed":"1.7.25"}],"type":"SEMVER"},{"events":[{"introduced":"1.8.0-rc.0"},{"fixed":"1.8.17"}],"type":"SEMVER"}],"versions":["1.5.7","1.5.8","1.5.9","1.5.10","1.5.11","1.5.12","1.5.13","1.5.14","1.5.15","1.6.0-rc.0","1.6.0-rc.1","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","1.6.6","1.6.7","1.6.8","1.6.9","1.6.10","1.6.11","1.6.12","1.6.13","1.6.14","1.6.15","1.6.16","1.6.17","1.7.0-rc.0","1.7.0-rc.1","1.7.0-rc.2","1.7.0-rc.3","1.7.0","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.7","1.7.8","1.7.9","1.7.10","1.7.11","1.7.12","1.7.13","1.7.14","1.7.15","1.7.16","1.7.17","1.7.18","1.7.19","1.7.20","1.7.21","1.7.22","1.7.23","1.7.24","1.8.0-rc.0","1.8.0-rc.1","1.8.0-rc.2","1.8.0-rc.3","1.8.0-rc.4","1.8.0","1.8.1","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.8.7","1.8.8","1.8.9","1.8.10","1.8.11","1.8.12","1.8.13","1.8.14","1.8.15","1.8.16"]},{"ranges":[{"events":[{"introduced":"07b401901fc1d649f126eee6315b5eb01fa5c85c"},{"fixed":"c255d983e03893ae46abf01d13c3ec3bd20f029c"}],"repo":"https://github.com/phoenixframework/phoenix","type":"GIT"},{"events":[{"introduced":"cf098e9cf7a44ee6479d31d911a97d3c7430c6fe"},{"fixed":"30e5d9d7704b964772c131314508c45ed85ed807"},{"fixed":"5d57f442a1ffab8a866add770477a14a0cd792d9"},{"fixed":"eddaeb6d50c903fc77b465dbf3efd89feee0816b"}],"repo":"https://github.com/phoenixframework/phoenix","type":"GIT"}]}],"aliases":["GHSA-5vmc-qgf8-rw36","CVE-2026-129344"],"credits":[{"name":"Peter Ullrich","type":"FINDER"},{"name":"Peter Ullrich","type":"REPORTER"},{"name":"Steffen Deusch","type":"REMEDIATION_DEVELOPER"},{"name":"José Valim","type":"REMEDIATION_REVIEWER"}],"database_specific":{"capec_ids":["CAPEC-220"],"cpe_ids":["cpe:2.3:a:phoenixframework:phoenix:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-248"]},"details":"## Summary\n\nUncaught Exception vulnerability in phoenixframework phoenix allows an unauthenticated attacker to cause a denial of service via a client-selected legacy serializer on binary channel broadcasts.\n\nWhen an application broadcasts `{:binary, data}` payloads on a channel topic, any client that connects without a `vsn` parameter, or with `vsn=1.0.0`, and joins that topic makes those broadcasts fail. `Phoenix.Channel.Server.send/4` encodes each broadcast with every subscriber's own serializer inside the PubSub dispatch loop, calling `fastlane!/1` with no rescue, and the negotiated `Phoenix.Socket.V1.JSONSerializer` raises `Protocol.UndefinedError` on a binary payload. Every binary broadcast on the topic then crashes the broadcasting process and skips every subscriber dispatched after the attacker. For broadcasts arriving from other nodes the loop runs in the PubSub adapter worker, whose repeated crashes restart the PubSub supervisor and empty the node's subscription registry while sockets stay connected.\n\nThis issue affects phoenix: from 1.5.7 before 1.5.16, from 1.6.0-rc.0 before 1.6.18, from 1.7.0-rc.0 before 1.7.25, and from 1.8.0-rc.0 before 1.8.17.\n\n## Details\n\n**1. Serializer selection.** The socket picks its serializer from the client's `vsn` parameter. A missing `vsn` or `vsn=1.0.0` selects `Phoenix.Socket.V1.JSONSerializer`, and `Phoenix.Channel.Server` registers it as the subscriber's fastlane metadata when the channel joins.\n\n**2. Shared dispatch.** A broadcast runs `Phoenix.Channel.Server.send/4` once per subscriber, inside the PubSub dispatch loop of the broadcasting process. It encodes the message with each subscriber's serializer through `fastlane!/1` and has no rescue.\n\n**3. Crash.** `Phoenix.Socket.V1.JSONSerializer.fastlane!/1` JSON-encodes the payload, so a `{:binary, data}` tuple raises `Protocol.UndefinedError`. The exception aborts the loop: the broadcasting channel crashes (its client receives `phx_error`) and every subscriber after the attacker misses the message.\n\n**4. Cluster spread.** For broadcasts from other nodes, the same loop runs in the `Phoenix.PubSub.PG2` adapter worker. Each forwarded binary broadcast crashes it, and repeated crashes exceed the restart intensity and restart the PubSub supervisor, which empties the subscription registry while sockets stay connected. The report simulated this step locally by sending `:forward_to_local` to the worker.\n\n## Proof of concept\n\n1. Run a Phoenix endpoint with a channel whose `handle_in/3` calls `broadcast(socket, \"evt\", {:binary, <<0, 1, 2, 3>>})` on its topic.\n2. As the attacker, open `/socket/websocket?vsn=1.0.0` and join the topic with a V1 frame (`{\"topic\": ..., \"event\": \"phx_join\", \"payload\": {}, \"ref\": ...}`).\n3. Connect several V2 clients (`vsn=2.0.0`) and join the same topic.\n4. From another V2 client on the topic, push the event that triggers the binary broadcast.\n5. The broadcaster receives `phx_error`, the log shows `Protocol.UndefinedError` raised from `Phoenix.Socket.V1.JSONSerializer.fastlane!/1` through `Phoenix.Channel.Server.send/4`, and the V2 subscribers after the attacker receive nothing. Without the attacker, the same broadcast reaches every subscriber.\n\n## Impact\n\nAn attacker who can join a topic makes every binary broadcast on it fail, crashing the broadcasting channel and starving the other subscribers. In clustered deployments, forwarded broadcasts crash the PubSub adapter worker until the node's subscriptions are lost.\n\n## Workarounds\n\nReject the V1 serializer by listing only the V2 serializer on each socket:\n\n```elixir\nsocket \"/socket\", MyAppWeb.UserSocket,\n  websocket: [serializer: [{Phoenix.Socket.V2.JSONSerializer, \"~> 2.0.0\"}]],\n  longpoll: [serializer: [{Phoenix.Socket.V2.JSONSerializer, \"~> 2.0.0\"}]]\n```\n\nClients that connect without a `vsn` parameter or with `vsn=1.0.0` are then refused.\n\n## Configurations\n\nThe application must broadcast `{:binary, data}` payloads (through `Phoenix.Channel.broadcast/3`, `broadcast_from/3`, or `Phoenix.Endpoint.broadcast/3`) on a channel topic that an untrusted client can join. Applications that broadcast only map payloads are not affected.","id":"EEF-CVE-2026-129344","modified":"2026-11-21T10:59:16.343054Z","published":"2026-11-21T10:59:15.168Z","references":[{"type":"ADVISORY","url":"https://github.com/phoenixframework/phoenix/security/advisories/GHSA-5vmc-qgf8-rw36"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-129344.html"},{"type":"WEB","url":"https://github.com/phoenixframework/phoenix/commit/07b401901fc1d649f126eee6315b5eb01fa5c85c"},{"type":"WEB","url":"https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix/commit/30e5d9d7704b964772c131314508c45ed85ed807"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix/commit/5d57f442a1ffab8a866add770477a14a0cd792d9"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix/commit/c255d983e03893ae46abf01d13c3ec3bd20f029c"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix/commit/eddaeb6d50c903fc77b465dbf3efd89feee0816b"},{"type":"PACKAGE","url":"https://hex.pm/packages/phoenix"}],"related":[],"schema_version":"1.8.0","severity":[{"score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"CNA","type":"CVSS_V4"}],"summary":"Client-selected V1 serializer crashes shared broadcast dispatch on binary payloads","upstream":[]}