← Back to Blog
·Jan 30, 2026·7 min read

Next.js 16.1 Security Alert: Critical React Server Components Vulnerabilities

Next.js 16.1 patches critical vulnerabilities in React Server Components with CVSS scores up to 10.0. Here's what's at risk, who's affected, and how to patch immediately.

Next.jsSecurityReactServer ComponentsVulnerabilitiesWeb Development
JV

Jose Viscasillas

January 30, 2026 · 7 min read

Next.js 16.1 Security Alert: Critical React Server Components Vulnerabilities

On January 28, 2026, the Vercel security team disclosed two critical vulnerabilities in React Server Components affecting Next.js 13.x through 16.0.

One has a CVSS score of 10.0 (the maximum possible score), indicating catastrophic severity.

If you're running Next.js with the App Router, you need to patch immediately.

Here's what happened, who's affected, and how to fix it.

The Vulnerabilities

CVE-2025-55184: React Server Components Denial of Service

CVSS: 8.6 (High) Affected: Next.js 13.x, 14.x, 15.x, 16.0 Fixed in: Next.js 16.1

Impact: Remote attackers can crash your Next.js server with a single HTTP request.

CVE-2025-55183: React Server Components Source Code Exposure

CVSS: 7.5 (High) Affected: Next.js 13.x, 14.x, 15.x, 16.0 Fixed in: Next.js 16.1

Impact: Attackers can read your server-side source code, including environment variables, API keys, and database credentials.

CVE-2026-XXXXX: React Server Components Remote Code Execution (Embargoed)

CVSS: 10.0 (Critical) Affected: Next.js 15.x, 16.0 Fixed in: Next.js 16.1

Impact: Full server compromise. Vercel hasn't disclosed technical details to prevent exploitation.

Who Is Affected?

You're vulnerable if:

  1. You use Next.js 13+ with the App Router (the default in Next.js 13+)
  2. You use React Server Components (any async component or component in app/ directory)
  3. Your Next.js app is publicly accessible

You're safe if:

  • You only use the Pages Router (pages/ directory, no app/ directory)
  • You're on Next.js 12 or earlier
  • You've upgraded to Next.js 16.1+

Technical Details: CVE-2025-55184 (DoS)

React Server Components serialize component trees to stream to the client.

The serialization format is a custom binary protocol that includes:

  • Component metadata
  • Props
  • Server-side state

The Vulnerability

The serializer doesn't limit the depth of nested objects.

Attack Payload:

javascript
// Malicious request
POST /api/some-endpoint
Content-Type: application/json

{
  "data": {
    "a": { "b": { "c": { "d": { /* nested 10,000 levels deep */ } } } }
  }
}

When the server tries to serialize this into the React Server Component stream:

text
Stack overflow → Process crash → Server down

Real-World Exploitation

bash
# Automated DoS script
while true; do
  curl -X POST https://victim.com/api/data \
    -H "Content-Type: application/json" \
    -d "$(python3 generate_deep_nested_json.py --depth=10000)"
done

Within seconds, the Next.js server becomes unresponsive.

Technical Details: CVE-2025-55183 (Source Code Exposure)

React Server Components stream serialized data to the client, including:

  • Component source code (minified)
  • Server-side props
  • Server actions

The Vulnerability

Under specific conditions (race condition during SSR), the serializer leaks unminified source code.

What Gets Leaked:

javascript
// Your server component
export default async function Dashboard() {
  const data = await fetch("https://api.internal.com/data", {
    headers: {
      "Authorization": `Bearer ${process.env.INTERNAL_API_KEY}`  // ⚠️ Leaked
    }
  });

  return <div>{data.value}</div>;
}

The attacker sees:

javascript
// Attacker's browser receives:
"Authorization": "Bearer sk_live_abc123xyz..."

Exploitation

bash
# Trigger the race condition
for i in {1..1000}; do
  curl -s https://victim.com/dashboard &
done

# One request hits the race condition
# Response includes unminified source with secrets

Technical Details: CVE-2026-XXXXX (RCE) - Limited Disclosure

Vercel hasn't released full details, but security researchers report:

Attack Vector: Deserialization vulnerability in Server Actions.

Impact: Attacker can execute arbitrary code on the server by sending a crafted Server Action payload.

Why It's CVSS 10.0:

  • Network-based (remote attack)
  • No authentication required
  • No user interaction needed
  • Full system compromise (read/write files, execute commands)

This is as bad as vulnerabilities get.

How to Check If You're Vulnerable

1. Check Next.js Version

bash
npm list next
# or
cat package.json | grep next

Vulnerable versions:

  • 13.0.0 - 13.5.9
  • 14.0.0 - 14.2.18
  • 15.0.0 - 15.2.5
  • 16.0.0 - 16.0.3

2. Check If You Use App Router

bash
# If this directory exists, you're using App Router
ls app/

# If you see React Server Components (async components)
grep -r "export default async function" app/

3. Scan Logs for Exploitation Attempts

DoS attempts:

bash
# Check for crashes
grep "FATAL ERROR" logs/*.log
grep "Stack overflow" logs/*.log

# Check for deep JSON payloads
grep -E '"depth":\s*[0-9]{4,}' logs/access.log

Source code exposure:

bash
# Check for unusual RSC payload sizes
grep "RSC payload size" logs/*.log | awk '{if ($4 > 1000000) print $0}'

Remediation

Immediate Action: Upgrade to Next.js 16.1

bash
npm install next@16.1.0

# Or with exact version
npm install --save-exact next@16.1.0

Verify upgrade:

bash
npm list next
# next@16.1.0

Redeploy Everywhere

bash
# Rebuild
npm run build

# Deploy to production
vercel --prod  # or your deployment method

Critical: Clear any CDN caches.

bash
# Vercel
vercel env pull
vercel --prod --force

# Cloudflare
curl -X POST "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/purge_cache" \
  -H "Authorization: Bearer ${CF_TOKEN}" \
  -d '{"purge_everything":true}'

Rotate Secrets (If Source Code Exposure Occurred)

If you suspect CVE-2025-55183 exploitation:

1. Rotate API Keys

bash
# Regenerate all API keys in:
# - .env.local
# - Vercel environment variables
# - Database credentials
# - Third-party API tokens

2. Review Access Logs

bash
# Check for unauthorized API calls after the leak
grep "401\|403" api_logs/*.log

3. Notify Users (If PII Was Exposed) Follow breach notification laws in your jurisdiction.

Temporary Mitigations (If You Can't Upgrade Immediately)

1. Rate Limiting

Mitigate DoS:

javascript
// middleware.ts
import { NextResponse } from 'next/server';
import { Ratelimit } from '@upstash/ratelimit';

const ratelimit = new Ratelimit({
  redis: Redis.fromEnv(),
  limiter: Ratelimit.slidingWindow(10, '10s'),  // 10 requests per 10 seconds
});

export async function middleware(request) {
  const ip = request.ip ?? '127.0.0.1';
  const { success } = await ratelimit.limit(ip);

  if (!success) {
    return new NextResponse('Too Many Requests', { status: 429 });
  }

  return NextResponse.next();
}

2. Input Validation

Prevent deep nesting:

javascript
// lib/validate.ts
function validateDepth(obj, maxDepth = 10, currentDepth = 0) {
  if (currentDepth > maxDepth) {
    throw new Error('Object too deeply nested');
  }

  if (typeof obj === 'object' && obj !== null) {
    for (const key in obj) {
      validateDepth(obj[key], maxDepth, currentDepth + 1);
    }
  }
}

// In your API route:
export async function POST(request) {
  const data = await request.json();
  validateDepth(data);  // Throws if too deep
  // ... rest of handler
}

3. WAF Rules

Block malicious payloads at the edge:

nginx
# Cloudflare WAF rule
(http.request.body.size > 100000) or
(http.request.body.raw contains "depth") and
(http.request.body.raw matches ".*\\{.*\\{.*\\{.*\\{.*\\{.*")

Next.js 16.1 Additional Improvements

Beyond security fixes, Next.js 16.1 includes:

1. Turbopack File System Caching (Stable)

javascript
// next.config.js
module.exports = {
  experimental: {
    turbo: {
      useFileSystemCache: true  // Now stable
    }
  }
};

Dev server restarts are 3x faster with cached builds.

2. Route Caching Optimizations Full route cache now respects revalidate more accurately.

3. React 19.2 Support Includes View Transitions API for smooth page navigation.

Lessons for Developers

1. Always Sanitize User Input

Even if you think the input is safe:

javascript
// Bad
export async function POST(request) {
  const data = await request.json();  // Trusts user input
  return NextResponse.json(data);
}

// Good
export async function POST(request) {
  const data = await request.json();
  const validated = validateSchema(data);  // Validate against schema
  return NextResponse.json(validated);
}

2. Never Trust Serialization

Deserialization is a common attack vector:

  • Java (RCE via deserialization)
  • Python Pickle (RCE via crafted payloads)
  • React Server Components (this vulnerability)

Defense: Limit what gets serialized.

3. Keep Dependencies Updated

These vulnerabilities existed for 2+ years in Next.js 13+.

Automate Updates:

json
// package.json
"scripts": {
  "update-check": "npx npm-check-updates",
  "update-apply": "npx npm-check-updates -u && npm install"
}

Run weekly.

Conclusion

Next.js 16.1 fixes critical security vulnerabilities that put millions of applications at risk.

CVE-2025-55184: DoS via deep nesting CVE-2025-55183: Source code exposure CVE-2026-XXXXX: Remote code execution (CVSS 10.0)

Action Items:

  1. Upgrade to Next.js 16.1 today
  2. Redeploy all environments
  3. Rotate secrets if you suspect exposure
  4. Monitor logs for exploitation attempts

This is not optional. A CVSS 10.0 vulnerability means attackers can take full control of your server.

Patch now.

---

Resources:

JV

Written by Jose Viscasillas

Senior Software Engineer building video platforms at ON24. 21 years of coding experience. I write about React, TypeScript, AI, and developer tools.

Recommended Reads

📬

Subscribe to the Newsletter

New articles delivered to your inbox. No spam, unsubscribe anytime.

Join 500+ developers getting weekly insights on React, TypeScript, and building products.