Skip to main content
Menu
Advisories

Unsanitized presence key crashes Presence tracker

GHSA-PVFX-RX4X-PHRRPublished Updated GitHub

Description

A channel join with a non-string presence key (e.g. a JSON object as name) crashes the Phoenix.Presence tracker shard, killing every tracked channel/LiveView process and wiping presence. Repeated joins take down the application supervisor. Applications are advised to either upgrade or validate the arguments they pass to Presence.track/2 and Presence.track/3, forcing the presence key to be a string.

Impact

Remote denial of service. It affects any app that uses Phoenix.Presence with unsanitized client keys, or with a fetch/2 that can raise on one. The attacker only needs to be able to join a channel.

Affected versions

References

GitHub · phoenixframework/phoenix