CVE-2026-56812: Phoenix JavaScript Presence Client Denial of Service Vulnerability
Summary
CVE-2026-56812: Improper Check for Unusual or Exceptional Conditions vulnerability in phoenixframework phoenix (Presence JavaScript client) allows an attacker with ordinary channel access to cause a persistent client-side denial of serv... Affects phoenix across 8 version ranges.
>= 1.2.0-rc.0, < 1.5.15
>= 1.6.0-rc.0, < 1.6.17
>= 1.7.0-rc.0, < 1.7.24
>= 1.8.0-rc.0, < 1.8.9
< 89a1c4be161e436241e12b2378a719904b9bd96f
>= 2270aaf21bd02c6a6a1022820564efb605a97655, < 7f7b971c1ea0994e3fbd1c11ddb05e780bd38ad8
< b90b22521465ece00eb5a19d5aa2b9465b209c85
< beffc4da1e787e572121f68902c63daf4fe7d9c2
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Phoenix is a framework for building scalable and maintainable applications in Elixir, providing real-time features through channels and presence. The Phoenix JavaScript presence client allows applications to track user presence in real-time. However, it is vulnerable to a denial of service attack when presence keys collide with Object.prototype members, which can lead to persistent client-side crashes.
Vulnerability Detail
The vulnerability arises from an improper check for existing presence keys in the Phoenix JavaScript presence client. Instead of verifying if a key is an own property, the client uses a truthiness test, allowing an attacker to exploit this by choosing keys that are Object.prototype member names. This results in a TypeError when the client attempts to access properties of the prototype, causing a denial of service for all viewers of the affected presence channel.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 1.2.0-rc.0, < 1.5.151.5.15 -
>= 1.6.0-rc.0, < 1.6.171.6.17 -
>= 1.7.0-rc.0, < 1.7.241.7.24 -
>= 1.8.0-rc.0, < 1.8.91.8.9
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, reject or sanitize presence keys that collide with JavaScript Object.prototype member names before calling Phoenix.Presence.track. For example, you can implement a check like this:
const invalidKeys = ['__proto__', 'constructor', 'prototype', 'toString', 'hasOwnProperty'];
function isValidKey(key) {
return !invalidKeys.includes(key);
}
if (isValidKey(presenceKey)) {
Phoenix.Presence.track(presenceKey, ...);
} else {
console.error('Invalid presence key.');
}
Conclusion
CVE-2026-56812 presents a significant risk to applications using the Phoenix JavaScript presence client, allowing for denial of service attacks through improper handling of presence keys. It is crucial to update to the latest patched versions or implement workarounds to mitigate this vulnerability.
See every vulnerability recorded for phoenix →
FAQ
CVE-2026-56812 is a vulnerability in the Phoenix JavaScript presence client that allows an attacker to cause a denial of service by using presence keys that collide with Object.prototype members.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
The patched versions of the Phoenix package are 1.5.15, 1.6.17, 1.7.24, and 1.8.9. It is recommended to update to one of these versions.
If you cannot update the package immediately, implement a workaround by sanitizing presence keys to avoid using Object.prototype member names.
The CVSS score of this vulnerability is 6.3, indicating a moderate severity level.
Related vulnerabilities
Recent vulnerabilities recorded for phoenix.