Skip to content

Fix React Server Components RCE vulnerability - #1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/dependencies-for-react-flight-s9x4ba
Draft

Fix React Server Components RCE vulnerability#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/dependencies-for-react-flight-s9x4ba

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 magicv. 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

## Project Analysis

The MagiCV project was analyzed to determine if it is affected by the React Flight / Next.js RCE advisory (CVE affecting vulnerable versions of Next.js and React Flight packages).

## Assessment Results

**Status: AFFECTED AND PATCHED** ✅

This repository was affected by the advisory and has been successfully patched.

### Vulnerability Details

The original project used:
- **Next.js**: `>=15.5.4` (which resolves to 16.0.0)
- Next.js 16.0.0 is a vulnerable version per the advisory
- The project also uses `react@^19.0.0` and `react-dom@^19.0.0`

### Patch Applied

The following change was made to address the advisory:

**Modified: `package.json`**
```
- "next": ">=15.5.4"
+ "next": "16.0.7"
```

**Updated: `pnpm-lock.yaml`**
- Next.js resolved from 16.0.0 to 16.0.7
- All dependent packages updated to work with Next.js 16.0.7
- React and React-DOM versions automatically managed by Next.js (resolved to 19.2.0)

### Why This Fix Is Correct

1. **Next.js Upgrade Rule Applied**: Next.js 16.x → 16.0.7
   - Per the advisory, the patched version for Next.js 16.x is 16.0.7
   - The fix correctly pins to 16.0.7 instead of allowing pre-patch versions

2. **React Flight Packages**: None present
   - The project does NOT use any vulnerable React Flight packages:
     - ✓ No `react-server-dom-webpack`
     - ✓ No `react-server-dom-parcel`  
     - ✓ No `react-server-dom-turbopack`
   - Only Next.js update is required

3. **React and React-DOM**: Not manually updated
   - Per the advisory, React and React-DOM themselves are not vulnerable
   - Next.js 16.0.7 automatically provides compatible versions
   - No manual React version updates are necessary

### Verification

- **Original**: Next.js `>=15.5.4` (resolves to vulnerable 16.0.0)
- **Patched**: Next.js `16.0.7` (secure version)
- **Lockfile**: Updated to reflect the patched version and all dependencies

## Files Modified

1. **package.json**
   - Updated `next` from `>=15.5.4` to `16.0.7`

2. **pnpm-lock.yaml**
   - Updated Next.js and all related dependencies to work with 16.0.7
   - Verified React versions are appropriate (19.2.0)

## Conclusion

The MagiCV project was vulnerable due to using Next.js 16.0.0 (via the version range `>=15.5.4`). This has been successfully patched by:
1. Pinning Next.js to the patched version 16.0.7
2. Updating the lockfile to resolve the correct versions
3. Ensuring no React Flight packages introduce additional vulnerabilities

The project is now secure against the React Flight / Next.js RCE advisory.

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

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@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)
magicv Error Error Dec 8, 2025 8:26am

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