A Deep And Very Technical Analysis of CVE-2025-55182 (React2... #1676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post provides a deep, step‑by‑step technical analysis of CVE‑2025‑55182 (React2Shell), a CVSS 10.0 unauthenticated remote code execution vulnerability in the React Server Components (RSC) Flight protocol, as implemented in React 19.x and meta‑frameworks such as Next.js, React Router, Waku, and @vitejs/plugin-rsc. It starts by explaining React’s history (state, Virtual DOM, bundling), then how meta‑frameworks introduced server‑side rendering (SSR), and finally how RSC and the Flight proto...
🔧 Technical Details
1. Abusing Flight’s reference syntax for prototype traversal and RCE
The core trick is to exploit React Flight’s reference grammar, where serialized strings beginning with
$are resolved byparseModelString, and:acts as a property accessor. Attackers craft chunk values like"$1:__proto__:constructor:constructor"so that$1resolves to a base object (e.g., from chunk1) and__proto__ → constructor → constructorwalks the JavaScript prototype chain until it recovers the global Function constructor. Once aFunctionconstructor is available, serialized payloads can evaluate arbitrary JavaScript such asFunction("return process")()and then callprocess.mainModule.require('child_process').execSync('id')or similar, turning a data‑only Flight stream into remote code execution in the Node.js process.2. Chaining Promise...
🤖 Agent Actions
Summary:
NextJSdocumentation with a full technical breakdown of the React Server Components Flight protocol stream format, showing how attackers craft multipart chunk maps, use$references, and bypass middleware to reach thereact-serverdeserializer.parseModelStringprefix table, prototype-chain traversal example, promise/hex chunk gadget discussion, and the resultingFunction()RCE primitive derived from the React2Shell research.Testing: Not run (not applicable).
Files Modified:
src/network-services-pentesting/pentesting-web/nextjs.mdThis PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.