Skip to content

Fix React Server Components RCE vulnerability#1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/nextjsreact-flight-rce-vulnera-0xrtwn
Draft

Fix React Server Components RCE vulnerability#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/nextjsreact-flight-rce-vulnera-0xrtwn

Conversation

@vercel
Copy link
Copy Markdown

@vercel vercel Bot commented Dec 8, 2025

Important

This is an automatic PR generated by Vercel to help you with patching efforts. We can't guarantee it's comprehensive, and it may contain mistakes. Please review our guidance before merging these changes.

A critical remote code execution (RCE) vulnerability in React Server Components, impacting frameworks such as Next.js, was identified in the project mbg. 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 fully remediate the issue.

More Info | security@vercel.com

React Flight / Next.js RCE Advisory - Patch Implementation

## Summary
Successfully addressed the React Flight / Next.js RCE advisory by upgrading Next.js to a patched version.

## What Was Done

### 1. Vulnerability Assessment
The project was analyzed for vulnerability to the React Flight / Next.js RCE advisory:
- **Next.js Found**: Yes, version 16.0.1 (vulnerable)
- **React Flight Packages Found**: No (`react-server-dom-webpack`, `react-server-dom-parcel`, `react-server-dom-turbopack` not used)
- **Affected**: Yes, due to Next.js usage

### 2. Changes Made

#### Files Modified:
- **package.json**: Upgraded `next` from 16.0.1 to 16.0.7 (patched version for Next.js 16.x)
- **pnpm-lock.yaml**: Updated by `pnpm install` to reflect the new Next.js version

### 3. Upgrade Rationale
According to the React Flight / Next.js RCE advisory:
- Next.js 16.x requires patching to version 16.0.7
- For Next.js projects, React and React DOM versions should NOT be manually upgraded
- Next.js will automatically supply the correct React dependency versions
- No React Flight packages were in use, so no additional updates were needed

### 4. Dependency Resolution
- Ran `pnpm install` to update lockfile
- All dependencies resolved correctly
- Final lockfile contains Next.js 16.0.7
- React 19.2.0 and react-dom 19.2.0 remain unchanged (as intended for Next.js projects)

### 5. Build Verification
- Executed `pnpm build` successfully
- Next.js 16.0.7 (Turbopack) compiled without dependency-related errors
- All pages generated successfully
- Build confirmed the patched version is functioning correctly

## Technical Notes
- The project uses pnpm as its package manager
- It is a Next.js 16 application, not a monorepo
- No React Flight packages were detected, only the standard Next.js upgrade was required
- React versions were left untouched as per Next.js best practices

## Files Staged
- .vade-report
- package.json (Next.js version upgrade)
- pnpm-lock.yaml (dependency resolution)

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

vercel Bot commented Dec 8, 2025

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

Project Deployment Preview Comments Updated (UTC)
mbg Ready Ready Preview Comment Dec 8, 2025 3:47pm

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.

0 participants