May 8, 2026·6 min read·53 visits
Unauthenticated remote attackers can crash Phoenix Framework nodes by sending an 8MB NDJSON payload consisting entirely of newline characters to the LongPoll endpoint, triggering memory exhaustion via eager string evaluation.
The Phoenix Framework contains a high-severity Denial of Service vulnerability in its LongPoll transport mechanism. The vulnerability is caused by unbounded memory allocation when processing Newline Delimited JSON (NDJSON) payloads. Unauthenticated attackers can trigger Out-Of-Memory conditions on the host BEAM node, terminating all active sessions by forcing the server to evaluate excessive newline characters.
The Phoenix Framework utilizes a LongPoll transport mechanism to allow clients to maintain stateful communication via sequential HTTP requests when WebSockets are unavailable. The target component for this vulnerability is Phoenix.Transports.LongPoll, which is responsible for parsing incoming client messages. These messages are frequently formatted as Newline Delimited JSON (NDJSON), allowing multiple JSON objects to be transmitted in a single HTTP request body.
The vulnerability is classified as CWE-770 (Allocation of Resources Without Limits or Throttling). The flaw resides in the publish/4 function, which processes the NDJSON payloads. The lack of resource limits on the server's parsing logic enables unauthenticated remote attackers to trigger excessive memory consumption on the host system.
Successful exploitation results in a complete Denial of Service (DoS) of the affected Elixir node. The Erlang virtual machine (BEAM) runs out of memory and crashes, terminating all active websocket and longpoll sessions hosted on that node. This interrupts service availability for all users connected to the affected instance.
The vulnerability stems from the eager memory allocation strategy used in the vulnerable codebase. When the server receives an NDJSON payload, it parses the HTTP body by splitting the entire string on newline characters using the String.split/2 function. This function eagerly materializes a complete list of all parsed tokens in memory before passing them to the next operation.
This behavior creates a significant memory amplification effect within the BEAM virtual machine. An attacker sending an 8 megabyte HTTP POST body consisting entirely of newline characters forces the server to generate approximately 8.4 million empty string segments. Each element in an Erlang list, known as a cons cell, requires 16 bytes on a 64-bit architecture.
Generating the initial list of 8.4 million segments requires roughly 134 megabytes of heap space. The code subsequently passes this list to Enum.map, which immediately allocates a second list of identical size, effectively doubling the memory pressure to over 268 megabytes per request. Concurrent requests compound this memory usage linearly until the BEAM node exhausts available system memory and the operating system terminates the process.
The vulnerable implementation of Phoenix.Transports.LongPoll.publish/4 processed NDJSON payloads using eager string operations. The code utilized String.split/2 and Enum.map/2, which forced the entire payload to be parsed and stored in memory before dispatching messages.
# VULNERABLE CODE
body
|> String.split(["\n", "\r\n"])
|> Enum.map(fn part ->
# Processes all parts in memory simultaneously
transport_dispatch(part)
end)The patch introduced in commit 1a67c61ff9ce0a7711662ac7354861917a7c80f7 replaces this eager evaluation with lazy stream processing. By changing String.split/2 to String.splitter/2, the application now returns an enumerable stream that processes each payload segment sequentially. The memory footprint remains constant regardless of the total payload size.
# PATCHED CODE
body
|> String.splitter(["\n", "\r\n"])
# |> Stream.take(@max_poll_batch_size) # Limit pending future enforcement
|> Enum.find(fn part ->
# Processes each part individually, preventing memory accumulation
transport_dispatch(part)
end)The Enum.map operation was replaced with Enum.find, which iterates through the stream and dispatches messages to the transport layer individually. This change eliminates the memory amplification vector associated with list materialization.
Exploitation requires the attacker to construct a valid session token, which the application provides without authentication. The attacker issues an HTTP GET request to the LongPoll socket URL (e.g., /live/longpoll), ensuring a valid Origin header is included. The server responds with a session token necessary for the subsequent payload delivery.
The attacker then sends an HTTP POST request to the LongPoll publish endpoint using the acquired token. The request must include the Content-Type: application/x-ndjson header to trigger the vulnerable parsing path. The attacker populates the request body with 8 megabytes of continuous newline characters, maximizing the default read_body limit.
Upon receiving the payload, the server attempts to parse the heavily padded NDJSON body. The eager string splitting creates millions of empty list segments, rapidly exhausting the heap limit of the processing process. The BEAM node subsequently crashes due to an Out-Of-Memory condition.
The primary consequence of this vulnerability is a complete loss of availability for the targeted service. Since Phoenix applications often manage stateful connections via WebSockets and LongPolls, a node crash terminates all established client connections simultaneously. The vulnerability maps directly to MITRE ATT&CK technique T1499 (Endpoint Denial of Service) and CAPEC-130 (Excessive Allocation).
The vulnerability is assigned a CVSS 4.0 base score of 8.7. The attack complexity is low, requires no special privileges, and involves no user interaction. The network-based attack vector allows external exploitation of exposed endpoints, making any unpatched, internet-facing Phoenix instance highly vulnerable to service disruption.
As of disclosure, the vulnerability has an EPSS score of 0.00045, placing it in the 13.78th percentile for exploit probability. Current threat intelligence indicates no active exploitation in the wild, and the vulnerability is absent from the CISA Known Exploited Vulnerabilities (KEV) catalog.
Administrators must upgrade their Phoenix Framework installations to version 1.7.22 or 1.8.6. These releases incorporate both the server-side lazy parsing patch and a client-side JavaScript update that chunks outbound LongPoll messages. Legitimate clients now enforce a constant limit of 100 messages per request batch via the MAX_LONGPOLL_BATCH_SIZE variable.
For applications where immediate patching is unfeasible, administrators can mitigate the vulnerability by disabling the LongPoll transport entirely. By setting longpoll: false in the Phoenix.Socket configuration, the application rejects LongPoll connections while preserving standard WebSocket functionality. This is particularly relevant for Phoenix LiveView applications which enable LongPoll by default.
Analysis of the patch reveals a secondary weakness related to message limits. While the out-of-memory condition is mitigated via lazy stream processing, the server implementation does not currently enforce a strict upper bound on the number of processed messages per request. The constant @max_poll_batch_size remains commented out in the Elixir source. An attacker sending many valid, small JSON objects could still induce high CPU utilization or congestion within the process mailbox.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Phoenix Framework Phoenix Framework | >= 1.7.0, < 1.7.22 | 1.7.22 |
Phoenix Framework Phoenix Framework | >= 1.8.0, < 1.8.6 | 1.8.6 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-770 |
| Attack Vector | Network |
| CVSS Base Score | 8.7 (High) |
| EPSS Score | 0.00045 |
| Impact | Denial of Service (Node Crash) |
| Exploit Status | Unexploited / PoC Only |
| CISA KEV | No |
The software allocates a reusable resource or group of resources on behalf of an actor without any limits or throttling on the number or size of the allocated resources.
CVE-2026-105544 is a high-severity local elevation of privilege vulnerability in Microsoft .NET and Microsoft.TestPlatform.CLI. Improper access control on local inter-process communication mechanisms and execution brokers allows an authorized local attacker to cross security boundaries and execute arbitrary code in the context of a higher-privileged user running a test execution cycle.
CVE-2026-114152 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple servicing branches of the Microsoft .NET runtime (.NET 8.0, 9.0, 10.0, and 11.0) on Windows platforms. The vulnerability exists within the native symbol reader library, Microsoft.DiaSymReader.Native, specifically inside the DiaObjectFile::ApplyFixup method during the processing of Common Object File Format (COFF) relocation records. By supplying a malformed object file or Program Database (PDB) symbol file containing out-of-bounds relocation offsets or invalid symbol table indices, an unauthenticated attacker can trigger an untrusted pointer dereference (CWE-822) and a stack-based buffer overflow (CWE-121). Successful exploitation occurs when a victim opens, compiles, or debugs a malicious project or symbol artifact, leading to arbitrary code execution within the security context of the active developer environment or build process.
CVE-2026-118745 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the .NET runtime (8.0, 9.0, 10.0, and 11.0) on Windows systems. The flaw is a heap-based buffer overflow (CWE-122) located within the native symbol reading library, Microsoft.DiaSymReader.Native, specifically in the routines responsible for extracting and parsing Program Database (.pdb) line number metadata. An attacker can exploit this vulnerability by supplying a crafted .pdb file alongside a repository, project, or compiled binary. When a developer or automated diagnostic process parses the malformed debug symbols, an out-of-bounds heap write occurs, permitting arbitrary code execution within the security context of the active user process.
CVE-2026-109481 is a high-severity Cross-Site Request Forgery (CSRF) vulnerability in the ASP.NET Core Blazor Server and interactive component architecture. The flaw exists within the internal circuit state synchronization endpoint (`/_blazor/refresh`), which fails to enforce antiforgery token validation or verify cross-origin request headers. By inducing an authenticated victim to issue a cross-site request targeting a pre-allocated circuit identifier, an unauthenticated attacker can bind the victim's security principal to the attacker's active SignalR circuit, resulting in full privilege elevation within the application scope.
A critical deserialization vulnerability exists in React Server Components (RSC) packages (`react-server-dom-webpack`, `react-server-dom-parcel`, and `react-server-dom-turbopack`) across versions 19.0.0 through 19.3.0. The flaw occurs during the processing of React Flight protocol streams when handling multiple typed arrays sharing a backing ArrayBuffer alongside attacker-controlled inputs. By combining byte-stream buffer detachment semantics with unvalidated thenable invocation and exposed internal response states, an unauthenticated attacker can achieve remote code execution on server runtimes supporting React Server Components.
An improper output neutralization vulnerability (CWE-117 / CWE-150) exists in compose-lint version 0.31.0. When compose-lint is invoked on untrusted file paths without a preceding '--' option delimiter, Python's standard argparse module rejects malformed or dash-prefixed paths and writes them directly to standard error without passing through the application's output sanitizer. An attacker submitting a pull request containing crafted directory or file names with carriage returns or Unicode whitespace can inject arbitrary CI workflow commands into GitHub Actions or Azure Pipelines job logs.