Mar 1, 2026·6 min read·598 visits
CVE-2025-66478 (React2Shell) is a critical (CVSS 10.0) unauthenticated Remote Code Execution vulnerability in Next.js applications using the App Router. By manipulating the React Flight protocol serialization stream, attackers can invoke the JavaScript `Function` constructor to execute arbitrary code. Active exploitation has been observed. Immediate patching and secret rotation are required.
A critical vulnerability, designated CVE-2025-66478 (and tracking the upstream React CVE-2025-55182), exists in the React Server Components (RSC) implementation within Next.js. The flaw resides in the 'Flight' protocol, used for serializing component trees between the server and client. Specifically, the server-side deserializer fails to properly validate reference types in `multipart/form-data` payloads, allowing attackers to access the global `Function` constructor via prototype pollution gadgets. This leads to arbitrary code execution on the server without authentication.
CVE-2025-66478 represents the Next.js-specific tracking identifier for a critical deserialization flaw in the React Server Components (RSC) architecture, widely referred to as 'React2Shell'. The vulnerability stems from the upstream React library (tracked as CVE-2025-55182) but primarily impacts Next.js applications due to the framework's default exposure of Server Actions and the App Router.
The core issue lies within the React Flight Protocol, a streaming protocol used to transport the Virtual DOM and component data from the server to the client. When a Next.js application processes a request (typically a POST request to a Server Action), it utilizes a streaming decoder to parse the incoming payload. This decoder supports a reference mechanism allowing parts of the stream to refer to previously defined chunks.
The vulnerability is a classic Deserialization of Untrusted Data (CWE-502). The decoder allows property access on referenced objects without sufficient validation. An attacker can craft a malicious payload that abuses this reference system to traverse the prototype chain (__proto__, constructor) and access the JavaScript Function constructor. Once the constructor is accessible, the attacker can instantiate it with arbitrary code strings and execute them within the Node.js context of the server.
The vulnerability is rooted in the resolveModel function within the react-server-dom-webpack and react-server-dom-turbopack packages. The React Flight protocol allows payloads to contain references, denoted by $ syntax (e.g., $1), which point to other chunks in the stream.
In the vulnerable implementation, the decoder permitted references to include property accessors, such as $1:key. While intended for legitimate object traversal, the logic failed to block access to sensitive internal properties. An attacker can supply a reference formatted as $1:constructor:constructor. In JavaScript, the constructor of a basic object is Object, and the constructor of Object is Function. This provides a direct handle to the global Function constructor, which is functionally equivalent to eval() when called.
Furthermore, the protocol supports a 'Bind' operator, denoted as $B, intended for lazy loading and binding arguments to functions. By chaining the polluted Function constructor reference with the $B handler, an attacker can force the server to invoke the constructed function immediately upon deserialization. The combination of unchecked property access during reference resolution and the ability to execute bound functions creates a reliable gadget chain for Remote Code Execution.
The attack leverages the specific structure of multipart/form-data requests that Next.js accepts for Server Actions. The attack flow proceeds as follows:
$@0 to refer to the first form field.$1:constructor:constructor. The decoder resolves this by taking the object at index 1 and walking up its prototype chain to the Function constructor.$B (bind) to bind the malicious string (e.g., require('child_process').execSync(...)) to the Function constructor and executes it.The lack of an allowlist for property accessors in the protocol parser is the definitive root cause.
Exploitation requires no authentication and can be performed against any Next.js application using the App Router (default in newer versions) that exposes a Server Action endpoint. Even if no explicit Server Actions are defined, the internal router endpoints may still be accessible.
Payload Structure:
The exploit uses a specifically crafted JSON payload passed via multipart/form-data. The critical component is the _formData reference abuse.
POST / HTTP/1.1
Host: target.com
Next-Action: arbitrary_id
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="0"
{"then":"$1:__proto__:then","status":"resolved_model","value":"{\"then\":\"$B1337\"}","_chunks":"$Q2","_formData":{"get":"$1:constructor:constructor"}}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="1"
"$@0"
------WebKitFormBoundary7MA4YWxkTrZu0gW--Mechanism:
In this payload, the _formData property exploits the get handler to resolve $1:constructor:constructor. The payload is designed to satisfy the thenable checks within React's internal promise handling, forcing the resolution of the malicious function.
Indicators of Compromise:
Successful exploitation results in the command specified in the payload (e.g., whoami, curl) being executed with the privileges of the Node.js process running the Next.js server. This often leads to immediate reverse shell connections or exfiltration of environment variables.
The impact of CVE-2025-66478 is rated Critical (CVSS 10.0) because it grants full control over the server application without any prior credentials.
Confidentiality (High): Attackers can read all environment variables (process.env), which typically contain database connection strings, API keys (AWS, Stripe, OpenAI), and signing secrets. This allows lateral movement to other infrastructure components.
Integrity (High): Attackers can modify application source code, inject persistent backdoors (e.g., adding a middleware that logs all user credentials), or modify data in connected databases.
Availability (High): The attacker can crash the server, delete critical files, or deploy ransomware.
Since Next.js applications are often exposed directly to the internet (unlike internal microservices), the attack surface is vast. The vulnerability affects the default configuration of the widely adopted App Router.
Remediation requires upgrading the next package to a patched version. Vercel and the React team have released fixes that strictly validate references in the Flight protocol, blocking access to constructor and prototype.
Patched Versions:
Immediate Actions:
npm install next@latest or yarn add next@latest immediately.npx fix-react2shell-next.Temporary WAF Mitigation:
If patching is not immediately possible, configure your WAF to block POST requests containing Next-Action headers where the body contains strings like $B, $@, or constructor:constructor. However, WAF rules are easily bypassed by obfuscation; patching is the only complete solution.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Next.js Vercel | 15.0.0 - 15.0.4 | 15.0.5 |
Next.js Vercel | 15.1.0 - 15.1.8 | 15.1.9 |
Next.js Vercel | 16.0.0 - 16.0.6 | 16.0.7 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-502 |
| Attack Vector | Network (HTTP POST) |
| CVSS | 10.0 (Critical) |
| Exploit Status | Active / Weaponized |
| Protocol | React Flight (RSC) |
| Impact | Remote Code Execution (RCE) |
The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.
CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.
CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.