CVE-2026-56812: Phoenix: Presence keys colliding with `Object.prototype` members break existence checks
The Phoenix JavaScript presence client (assets/js/phoenix/presence.js) tests whether a presence already exists using a bare truthiness check (state[key]) rather than an own-property check. Because applications commonly track presences under a client-supplied username or id, the presence key can be attacker-controlled. A user who joins a channel and picks a key that names an Object.prototype member (__proto__, constructor, toString, hasOwnProperty, and similar) makes the lookup return the inherited Object.prototype object instead of undefined, which is truthy. The code then reads .metas.map(...) off it and throws an uncaught TypeError, breaking presence sync for every viewer of that channel topic. Any authenticated channel participant can trigger it.
References
- cna.erlef.org/cves/CVE-2026-56812.html
- github.com/advisories/GHSA-63mc-hw7g-86rr
- github.com/phoenixframework/phoenix/commit/7f7b971c1ea0994e3fbd1c11ddb05e780bd38ad8
- github.com/phoenixframework/phoenix/commit/89a1c4be161e436241e12b2378a719904b9bd96f
- github.com/phoenixframework/phoenix/commit/b90b22521465ece00eb5a19d5aa2b9465b209c85
- github.com/phoenixframework/phoenix/commit/beffc4da1e787e572121f68902c63daf4fe7d9c2
- github.com/phoenixframework/phoenix/security/advisories/GHSA-63mc-hw7g-86rr
- nvd.nist.gov/vuln/detail/CVE-2026-56812
- osv.dev/vulnerability/EEF-CVE-2026-56812
Code Behaviors & Features
Detect and mitigate CVE-2026-56812 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →