Long-poll NDJSON body splitting causes unbounded memory allocation in Phoenix
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| phoenixframework | phoenix | unaffected |
|
|||||||||
| phoenixframework | phoenix | unaffected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Phoenixframework | Phoenix |
|
||||||||||||||||
| Phoenixframework | Phoenix |
|
Vendor Workaround
Disable the longpoll transport on all Phoenix.Socket declarations, including the LiveView /live socket, by removing or setting longpoll: false. Note that this prevents clients that cannot use WebSockets from connecting.
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-628h-q48j-jr6q | Phoenix: Long-poll NDJSON body splitting causes large memory allocation |
No CVSS v3.1
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.469% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Allocation of Resources Without Limits or Throttling vulnerability in phoenixframework phoenix allows a denial of service via the long-poll transport's NDJSON body handling. In 'Elixir.Phoenix.Transports.LongPoll':publish/4, when a POST request is received with Content-Type: application/x-ndjson, the request body is split on newline characters using String.split/2 with no limit on the number of resulting segments. An attacker can send a body consisting entirely of newline bytes, causing a 1:1 amplification into a list of empty binaries — a 1 MB body produces approximately one million list elements, an 8 MB body approximately 8.4 million. Each element is then walked by Enum.map, materializing another list of the same size. This exhausts BEAM memory and schedulers, crashing the node and terminating all active sessions. A session token required to reach the vulnerable endpoint is freely obtainable by any client via an unauthenticated GET request to the same URL with a matching Origin header, making this attack effectively unauthenticated. This issue affects phoenix: from 1.7.0 before 1.7.22 and 1.8.6. | |
| Title | Long-poll NDJSON body splitting causes unbounded memory allocation in Phoenix | |
| First Time appeared |
Phoenixframework
Phoenixframework phoenix |
|
| Weaknesses | CWE-770 | |
| CPEs | cpe:2.3:a:phoenixframework:phoenix:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Phoenixframework
Phoenixframework phoenix |
|
| References |
|
|
| Metrics |
cvssV4_0
|