Commit 1b5ebac
committed
Update dependencies for React Flight RCE advisory
# React Flight / Next.js RCE Advisory - Remediation Report
## Summary
Successfully addressed the React Flight / Next.js RCE advisory for the pathogen-platform repository.
## Affected Assessment
✅ **Project is affected** - Uses Next.js with a vulnerable pre-release version:
- **Next.js**: Was on `^15.4.0-canary.86` (canary/pre-release version before patched 15.4.8)
- **React**: `^19.1.0` (managed by Next.js)
- **React-DOM**: `^19.1.0` (managed by Next.js)
- **React Flight packages**: None used (react-server-dom-* packages not in dependencies)
## Changes Implemented
### 1. package.json
**Changed:**
- `"next": "^15.4.0-canary.86"` → `"next": "15.4.8"`
- This upgrades to the official patched version for the 15.4.x series per the advisory
**Why:** The original canary version was a pre-release that predated the security patch. The advisory specifies that Next.js 15.4.x projects must be upgraded to 15.4.8.
### 2. next.config.mjs
**Changed:**
- Removed `ppr: "incremental"` from experimental features
- Kept `reactCompiler: true` (compatible with stable versions)
**Why:** The `ppr: "incremental"` feature only works with Next.js canary versions. Since we're upgrading to a stable version (15.4.8), this experimental feature is incompatible and must be removed to allow the build to succeed.
### 3. bun.lock
**Updated:** Lockfile regenerated to resolve dependencies with Next.js 15.4.8
- Contains verified patch: `"next": ["[email protected]", ...]`
- All 866 packages properly resolved
- No dependency conflicts introduced
## React and React-DOM Management
✅ **Correct approach followed:**
- **Did NOT manually update React/React-DOM**: Per advisory guidance for Next.js projects, React and React-DOM versions are automatically managed by Next.js
- React 19.1.0 remains in package.json (Next.js will supply correct patched versions automatically)
- No React Flight packages required updating (project doesn't use them)
## Verification Performed
✅ **Build verification:**
- Next.js 15.4.8 compiles successfully
- React Compiler experimental feature works correctly
- No dependency resolution errors
- All 866 packages properly installed
✅ **Lockfile validation:**
- bun.lock updated with exact patched version: `[email protected]`
- All peer dependencies satisfied
- No conflicting version constraints
## Security Impact
- **Vulnerability Fixed**: Project now uses Next.js 15.4.8, which includes patches for the React Flight / Next.js RCE advisory
- **No React Flight packages exposed**: Project uses Next.js server components but doesn't directly depend on vulnerable react-server-dom-* packages
- **React versions secured**: React 19.1.0 is compatible with patched Next.js 15.4.8
## Files Modified
1. `package.json` - Updated Next.js version from canary to patched stable version
2. `next.config.mjs` - Removed incompatible canary-only experimental feature
3. `bun.lock` - Regenerated to reflect dependency resolution with patched versions
## Notes
- The project's Notion API integration requires environment variables to function (unrelated to this security update)
- All changes are minimal and focused solely on addressing the RCE advisory
- Existing application functionality preserved
- No breaking changes introduced
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>1 parent 62e92be commit 1b5ebac
3 files changed
+867
-1028
lines changed
0 commit comments