Summary
A denial of service vulnerability in React Server Components allows specially crafted HTTP requests to Server Function endpoints to trigger excessive CPU usage.
Under continuous or coordinated attack, this condition can degrade application responsiveness or temporarily make affected services unavailable, even though the error ultimately becomes catchable after the CPU spike.
Affected context
This issue arises in applications using React Server Components with the affected react-server-dom-* packages, where Server Function endpoints are exposed over HTTP.
It is relevant when:
- Server Functions accept and process untrusted client input
- Application servers have finite CPU capacity shared across requests
- There is no upstream rate limiting or resource isolation preventing a single request from monopolizing CPU time
The vulnerability is triggered by specific request payloads that cause the server to perform disproportionate computation relative to the request's legitimate workload.
Exploit preconditions
- Attack surface: Public or internal HTTP endpoints for React Server Components Server Functions
- Required access: Ability to send HTTP requests to the affected Server Function endpoints (typically unauthenticated or minimally authenticated in many setups)
- Trigger point: Processing of a specially crafted request payload in the react-server-dom-parcel, react-server-dom-turbopack, or react-server-dom-webpack stack
- Why exploitation is possible: Input to Server Functions can induce computations or processing paths that consume excessive CPU resources for an extended duration, without early termination or adequate resource guards, culminating in a catchable error only after the CPU spike has occurred
Why this happens
The underlying issue is an uncontrolled resource consumption problem consistent with CWE-400, where an attacker-controlled input can cause the system to perform expensive work that is disproportionate to the request.
In the React Server Components ecosystem, the server-side handling of certain payloads sent to Server Functions can lead to prolonged CPU-intensive processing before an error is finally thrown.
This suggests that the implementation does not sufficiently bound the cost of operations triggered by incoming requests, allowing a single request to monopolize CPU time.
While CWE-502 (unsafe deserialization) is also associated, the primary concern here is not arbitrary code execution but the ability of crafted data to drive pathological processing that starves other legitimate requests.
Potential impact
- Temporary unavailability of affected server instances due to CPU saturation
- Significant increase in response latency for legitimate users
- Degraded performance of co-hosted services sharing the same compute resources
- Potential cascading failures in upstream/downstream services due to timeouts and retry storms
- Exhaustion of auto-scaling capacity or increased infrastructure costs if scaling policies respond to the attack
General mitigation guidance
Effective mitigation focuses on limiting the computational impact of untrusted input and isolating resource-intensive work:
- Introduce rate limiting and throttling on Server Function endpoints to cap how many expensive requests a single client can issue.
- Apply input validation and normalization to reject or constrain malformed or unusually complex payloads before deep processing.
- Design Server Functions with bounded complexity, avoiding unbounded loops, recursion, or operations whose cost scales with attacker-controlled parameters.
- Use time-boxing or resource guards at the framework or middleware layer to abort requests that exceed CPU or time budgets.
- Employ isolation strategies, such as separating critical APIs from high-risk endpoints, and running them with different resource limits or in separate pools.
- Adopt least-privilege and capacity planning so that even if an endpoint misbehaves, it cannot starve the entire cluster of CPU.
How teams detect issues like this
Identifying this class of vulnerability involves monitoring, code review, and automated analysis:
- Application and infrastructure monitoring for CPU spikes correlated with specific Server Function routes or payload characteristics.
- Log analysis to detect repeated errors or timeouts originating from particular endpoints or clients during periods of high CPU usage.
- Static analysis and code review to flag Server Functions or request handlers that perform heavy computation, unbounded iterations, or complex parsing based on user-controlled input.
- Performance and fuzz testing that exercises Server Function endpoints with varied and adversarial payloads, tracking CPU utilization and latency under load.
- Use of automated code scanning tools configured with rules for uncontrolled resource consumption patterns and expensive operations driven by untrusted data.

