Phoenixの Presence で細工された存在キーにより、サービス停止の脆弱性
Summary
チャンネルに参加できる攻撃者が、数値や文字列以外の存在キーを送ることで、Phoenixのサービス拒否を引き起こせる脆弱性です。影響を受けるのは、1.2.0から1.5.16未満、1.6.0-rc.0から1.6.18未満、1.7.0-rc.0から1.7.25未満、1.8.0-rc.0から1.8.17未満のphoenixです。修正版が公開されているため、該当する版を使っている場合は修正版への更新を検討してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
チャンネルに参加できる攻撃者が、数値や文字列以外の存在キーを送ることで、Phoenixのサービス拒否を引き起こせる脆弱性です。影響を受けるのは、1.2.0から1.5.16未満、1.6.0-rc.0から1.6.18未満、1.7.0-rc.0から1.7.25未満、1.8.0-rc.0から1.8.17未満のphoenixです。修正版が公開されているため、該当する版を使っている場合は修正版への更新を検討してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| phoenixframeworkphoenix |
≥ 44e7618370629df93711cd6169789fd0d8f3678e (no fix yet)→ 39c1c6bfd0c817f1223c121f61c60a25f66b76cb, 6609595fb3e37f545c4ac636a369f14b0084bc3d, 81bc0278c7a4e6204f7e2e0a3b3200e9f1ee5a4b, edb702804aeab3a29543668a8be8ea61291c4b75 |
39c1c6bfd0c817f1223c121f61c60a25f66b76cb, 6609595fb3e37f545c4ac636a369f14b0084bc3d, 81bc0278c7a4e6204f7e2e0a3b3200e9f1ee5a4b, edb702804aeab3a29543668a8be8ea61291c4b75 |
| Hexphoenix |
≥ 1.2.0, < 1.5.16→ 1.5.16 ≥ 1.6.0-rc.0, < 1.6.18→ 1.6.18 ≥ 1.7.0-rc.0, < 1.7.25→ 1.7.25 ≥ 1.8.0-rc.0, < 1.8.17→ 1.8.17 |
1.5.16 1.6.18 1.7.25 1.8.17 |
Original description The description as published by the source.
Summary
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.
Details
1. Key accepted. The track/3,4 injected by use Phoenix.Presence passes any term to Phoenix.Tracker.track, which returns {:ok, ref}. The documented pattern `Presence.t…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package hex.pm
- package github.com
- patch github.com
- patch github.com
- patch github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com
- web repo.hex.pm