Improper Input Validation vulnerability in phoenixframework phoenix (Phoenix.Presence) allows an attacker who can join a channel to cause a denial of service via a non-string presence key.

track/3,4 accepts any term as the presence key, such as a JSON object taken from a join payload. The key is converted with to_string/1 only later, in Phoenix.Presence.group/1, which raises Protocol.UndefinedError on a map. group/1 runs whenever presences are listed and when each presence diff is broadcast, together with the application's fetch/2, which can likewise raise on an unexpected key. Once such a key is tracked, every process that lists presences on the topic crashes, typically each channel that joins it, and presence diffs for the topic are lost.

From 1.7.0 the diff runs in a Task.Supervisor.async task linked to the tracker shard, and Phoenix.Presence.handle_info/2 has no clause for its failure. The shard then terminates, taking down every channel and LiveView process tracked on it and erasing presence state for all its topics. Repeated joins exhaust the restart intensity and take down the application supervisor.

This issue affects phoenix: from 1.2.0 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.

Project Subscriptions

Vendors Products
Phoenixframework Subscribe
Phoenix Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

Validate every presence key before passing it to track/3,4, untrack/2,3 or update/3,4, so that only strings reach the tracker. For a key taken from client input, reject a join whose value is not a binary, or convert it explicitly: def join("room:" <> _, %{"name" => name}, socket) when is_binary(name) do send(self(), {:after_join, name}) {:ok, socket} end A fetch/2 callback must also not raise on any tracked key.

History

Sat, 21 Nov 2026 11:15:00 +0000

Type Values Removed Values Added
Description Improper Input Validation vulnerability in phoenixframework phoenix (Phoenix.Presence) allows an attacker who can join a channel to cause a denial of service via a non-string presence key. track/3,4 accepts any term as the presence key, such as a JSON object taken from a join payload. The key is converted with to_string/1 only later, in Phoenix.Presence.group/1, which raises Protocol.UndefinedError on a map. group/1 runs whenever presences are listed and when each presence diff is broadcast, together with the application's fetch/2, which can likewise raise on an unexpected key. Once such a key is tracked, every process that lists presences on the topic crashes, typically each channel that joins it, and presence diffs for the topic are lost. From 1.7.0 the diff runs in a Task.Supervisor.async task linked to the tracker shard, and Phoenix.Presence.handle_info/2 has no clause for its failure. The shard then terminates, taking down every channel and LiveView process tracked on it and erasing presence state for all its topics. Repeated joins exhaust the restart intensity and take down the application supervisor. This issue affects phoenix: from 1.2.0 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.
Title Unsanitized presence key crashes Presence tracker
First Time appeared Phoenixframework
Phoenixframework phoenix
Weaknesses CWE-20
CPEs cpe:2.3:a:phoenixframework:phoenix:*:*:*:*:*:*:*:*
Vendors & Products Phoenixframework
Phoenixframework phoenix
References
Metrics cvssV4_0

{'score': 8.2, 'vector': '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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-11-21T11:09:51.800Z

Reserved: 2026-11-18T13:53:21.753Z

Link: CVE-2026-128361

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-21T11:16:38.787

Modified: 2026-11-21T11:16:38.787

Link: CVE-2026-128361

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses