Skip to content

Fix React Server Components RCE vulnerability#6

Draft
vercel[bot] wants to merge 1 commit intoui-ux-upgradesfrom
vercel/react-flight-rce-vulnerability-6vcvyn
Draft

Fix React Server Components RCE vulnerability#6
vercel[bot] wants to merge 1 commit intoui-ux-upgradesfrom
vercel/react-flight-rce-vulnerability-6vcvyn

Conversation

@vercel
Copy link

@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 hidden-garden-poc. 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 Fix

## Summary
Successfully addressed the React Flight / Next.js RCE advisory by upgrading affected Next.js dependencies to patched versions.

## Vulnerability Assessment
The project was found to be affected by the React Flight / Next.js RCE advisory:
- **Next.js vulnerability detected**: Root `package.json` contained `next@^16.0.3` (vulnerable)
- **React Flight packages**: No React Flight packages (`react-server-dom-webpack`, `react-server-dom-parcel`, `react-server-dom-turbopack`) were found in the project
- **Note**: `react` and `react-dom` are not vulnerable on their own - they're only affected when used with vulnerable React Flight packages

## Changes Made

### Files Modified
1. **./package.json** - Upgraded Next.js version
   - Changed: `next@^16.0.3` → `next@^16.0.7`
   - Rationale: Next.js 16.x requires patch version 16.0.7 per the advisory

### Files Updated (Auto-generated)
1. **./pnpm-lock.yaml** - Updated by `pnpm install`
   - Locked `next@16.0.7` with dependencies
   - Updated React and React-DOM to compatible patched versions (19.2.1)

### Status of Other Workspaces
- **apps/aztecbat-ui/package.json**: Already had `next@^16.0.7` (correct patched version) - no changes needed
- Other packages: No Next.js or React Flight dependencies found

## Implementation Details

### Upgrade Rules Applied
Per the advisory's Next.js 16.x rules:
- `next@16.x` → `16.0.7` ✓

### Dependency Management
- React/React-DOM were not manually upgraded for Next.js projects (as per advisory - Next.js handles this automatically)
- Next.js automatically supplies correct patched React dependency versions

### Lockfile Verification
- Ran `pnpm install` to update `pnpm-lock.yaml`
- Verified lockfile contains: `next@16.0.7`
- Verified resolution is correct and no vulnerable versions remain

## Build Verification
- Next.js 16.0.7 installed and available
- Pre-existing application-level build issues (TypeScript errors in WalletProvider.tsx, missing Aztec module exports) were not addressed as they are unrelated to the security advisory
- These issues existed before the upgrade and are outside the scope of the RCE advisory fix

## Security Impact
✓ Root cause of React Flight RCE vulnerability is eliminated
✓ No manual React/React-DOM updates needed for Next.js projects
✓ Project is now protected against the advisory's CVE

## Notes
- The project is a monorepo using pnpm workspaces with 10 packages
- Most packages are non-web related (Aztec smart contracts, indexers, ZK circuits)
- Only the root workspace and `apps/aztecbat-ui` use Next.js
- The fix is complete and safe to merge

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel
Copy link
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)
hidden-garden-poc Error Error Dec 8, 2025 2:27pm

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