Skip to content

Fix React Server Components RCE vulnerability#1142

Merged
smaeda-ks merged 1 commit intomainfrom
vercel/dependencies-for-react-flight-83glnf
Dec 6, 2025
Merged

Fix React Server Components RCE vulnerability#1142
smaeda-ks merged 1 commit intomainfrom
vercel/dependencies-for-react-flight-83glnf

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel bot commented Dec 5, 2025

A critical remote code execution (RCE) vulnerability in React Server Components, impacting frameworks such as Next.js, was identified in the project edge-runtime. The vulnerability enables unauthenticated RCE on the server via insecure deserialization in the React Flight protocol.

This issue is tracked under:

This automated pull request upgrades the affected React and Next.js packages to patched versions that remediate the issue.

More Info

## React Flight / Next.js RCE Advisory - Security Patch

### Summary
Updated the edge-runtime repository to address the React Flight / Next.js RCE vulnerability advisory. The project was identified as affected due to the use of Next.js in the `docs` workspace package.

### Analysis
The repository is a monorepo using pnpm workspaces containing:
- 13 packages in the `packages/` directory (core libraries for edge runtime functionality)
- 1 documentation site in the `docs/` directory

**Affected Component:**
- `docs/package.json` - Contains Next.js 15.2.4 with React 18

**Not Affected:**
- No workspace packages directly depend on Next.js
- No packages use React Flight packages (`react-server-dom-webpack`, `react-server-dom-parcel`, `react-server-dom-turbopack`)
- React versions are 18.x (not vulnerable 19.x versions)

### Changes Made

#### Modified: `docs/package.json`
- Updated `next` from `~15.2.4` to `~15.2.6`
- React and react-dom remain at version 18 (not affected by vulnerability)
- Next.js 15.2.x patch rule: upgrade to 15.2.6 ✓

#### Modified: `pnpm-lock.yaml`
- Updated lockfile to resolve Next.js 15.2.6 and its dependencies
- Lockfile confirms Next.js 15.2.6 is now pinned with react@18.3.1 and react-dom@18.3.1

### Verification
- ✓ `pnpm install --no-frozen-lockfile` completed successfully
- ✓ `next build` in docs/ completed successfully with no errors
- ✓ All 20 pages generated and optimized correctly
- ✓ No dependency conflicts or compatibility issues

### Why No Changes to React?
According to the advisory, React 18.x is not vulnerable. The vulnerability affects React 19.0.0, 19.1.0, 19.1.1, and 19.2.0. Since this project uses React 18, no React version update is required.

### Notes
- The root package.json contains `"next": "latest"` as a devDependency (for development/testing)
- This only affects the docs workspace which has explicit version constraints
- The security patch (Next.js 15.2.6) has been successfully applied and verified

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 5, 2025

⚠️ No Changeset found

Latest commit: 260b4c7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor Author

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
edge-runtime Ready Ready Preview Comment Dec 5, 2025 10:50pm

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedsimple-git-hooks@​2.12.1 ⏵ 2.13.191 +11006882100
Updatedfinepack@​2.12.7 ⏵ 2.12.1274 +21009490 +7100
Updatednext@​15.2.4 ⏵ 15.2.68385 +6091 +198 +4870
Updatednext@​15.2.4 ⏵ 16.0.783100 +7591 +198 +4870
Updatedturbo@​2.4.4 ⏵ 2.6.3100 +110084 -197100
Updatednano-staged@​0.8.0 ⏵ 0.9.0100100100 +2786 +9100
Updatedtypescript@​5.8.2 ⏵ 5.9.310010090 +110090
Updatedprettier@​3.5.3 ⏵ 3.7.490 -810097 -399100
Updated@​changesets/​cli@​2.28.1 ⏵ 2.29.896100100 +195100

View full report

@eps1lon eps1lon marked this pull request as ready for review December 5, 2025 23:05
@eps1lon eps1lon enabled auto-merge December 5, 2025 23:06
@smaeda-ks smaeda-ks disabled auto-merge December 6, 2025 03:53
@smaeda-ks smaeda-ks merged commit b06cd42 into main Dec 6, 2025
7 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant