Skip to content

Fix React Server Components RCE vulnerability - #1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/react-flightnextjs-rce-vulnera-jnpd4i
Draft

Fix React Server Components RCE vulnerability#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/react-flightnextjs-rce-vulnera-jnpd4i

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

## Summary
Updated the repository to address the React Flight / Next.js RCE advisory (CVE-2024-xxxxx). The project was confirmed to be affected as it uses Next.js 15 with React Server Components.

## Changes Made

### Vulnerability Detection
- **Project Type**: Next.js 15 Application
- **Affected**: Yes - Using Next.js 15.5.2 (vulnerable version)
- **React Flight Packages**: None explicitly declared (Next.js manages them internally via react-server-dom-turbopack)

### Package Updates

**Modified Files:**
- `package.json`: Updated Next.js dependency versions
- `package-lock.json`: Regenerated with patched dependencies

**Version Upgrades:**
- `next`: 15.5.2 → 15.5.7 (patched version for 15.5.x minor)
- `eslint-config-next`: 15.5.2 → 15.5.7 (must match Next.js version)

**React Versions:**
- `react`: Remains 19.1.0 (Next.js 15.5.7 will supply correct patched version internally)
- `react-dom`: Remains 19.1.0 (Next.js 15.5.7 will supply correct patched version internally)

## Installation & Verification

✓ **Dependencies installed**: `npm install` completed successfully
✓ **Build successful**: `npm run build` completed without errors
✓ **Version verified**: Lockfile confirms Next.js 15.5.7 resolution

### Build Output
```
✓ Next.js 15.5.7 (Turbopack)
✓ Compiled successfully in 14.1s
✓ All pages generated without dependency errors
```

## Technical Details

The vulnerability in Next.js 15.5.2 (and other 15.x versions < 15.5.7) is related to how Next.js handles React Server Components through the internal `react-server-dom-turbopack` dependency. The patched version 15.5.7 includes fixes to prevent potential RCE attacks through maliciously crafted React Flight payloads.

The upgrade to 15.5.7 ensures:
1. Latest security patches for React Flight handling
2. Proper serialization/deserialization of Server Components
3. No breaking changes to application code or API surface

## Verification Steps Completed

1. ✓ Detected project is Next.js 15.x application
2. ✓ Identified affected Next.js version (15.5.2)
3. ✓ Upgraded to patched version (15.5.7)
4. ✓ Ran npm install to resolve dependencies
5. ✓ Verified build succeeds with patched version
6. ✓ Confirmed lockfile contains patched version

## Notes

- This is a security patch release (15.5.2 → 15.5.7) with no breaking changes
- React and React DOM are automatically managed by Next.js and don't require manual updates
- The application builds successfully with the patched version
- No code changes were required; only dependency versions were updated

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)
namsn Ready Ready Preview Comment Dec 8, 2025 3:45pm

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