Skip to content

Fix React Server Components RCE vulnerability - #1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/nextjsreact-flight-rce-advisor-nqjik0
Draft

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

Conversation

@vercel

@vercel vercel Bot commented Dec 8, 2025

Copy link
Copy Markdown

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 lore. 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 Update

### Summary
Updated the project to address the React Flight / Next.js RCE advisory by upgrading vulnerable packages to patched versions.

### Vulnerability Detection
The project was analyzed for the following affected packages:
- ✓ **next**: Found at 16.0.5 (vulnerable version)
- ✓ **react-server-dom-***: Not present (project does not use React Flight packages)
- ✓ **react/react-dom**: At 19.2.0 (not vulnerable versions)

### Changes Made

#### Modified Files:
1. **package.json**
   - Upgraded `next` from `16.0.5` to `16.0.7` (patched version for 16.x)
   - Upgraded `eslint-config-next` from `16.0.5` to `16.0.7` (matching the next.js version)

2. **package-lock.json**
   - Updated lockfile to reflect the new Next.js 16.0.7 version
   - All dependencies resolved correctly to their patched versions

### Upgrade Rationale
According to the advisory:
- For Next.js 16.x, the patched version is `16.0.7`
- The project was on `16.0.5`, which is within the vulnerable 16.x range
- React and React-DOM do not need manual updates when using Next.js, as Next.js supplies the correct patched versions automatically

### Verification Steps Completed
1. ✓ **Build verification**: `npm run build` completed successfully
   - Production build compiles with no errors
   - All routes generated correctly (13 static/dynamic pages)
   
2. ✓ **Dependency verification**: `npm list next react react-dom`
   - next@16.0.7 installed correctly
   - react@19.2.0 and react-dom@19.2.0 properly resolved
   
3. ✓ **Lockfile consistency**: Verified package-lock.json contains exact patched versions
   - next@16.0.7 resolved to correct npm package

### Notes
- The project is a single Next.js 16 application (not a monorepo)
- No React Flight / React Server Component packages are used
- React and React-DOM versions were not directly modified as they are managed by Next.js
- Pre-existing linter warnings are unrelated to this update

### Build Status
✓ Build successful - Production build compiles and generates all routes without errors

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

vercel Bot commented Dec 8, 2025

Copy link
Copy Markdown
Author

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

Project Deployment Preview Comments Updated (UTC)
lore Ready Ready Preview Comment Dec 8, 2025 0:02am

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