Next.js 16

Last reviewed Oct 15, 2026

Export as PDF

Prompt Details

Prompt Composition

5prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. React 1948 lines · 1.4K tokens
  4. TypeScript 746 lines · 1.5K tokens
  5. Next.js 1676 lines · 4.8K tokens
Total373 lines · 16.1K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 94
  • 95
  • 113
  • 117
  • 200
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 297
  • 306
  • 307
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 384
  • 426
  • 434
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 522
  • 524
  • 532
  • 601
  • 602
  • 613
  • 614
  • 639
  • 653
  • 732
  • 770
  • 807
  • 829
  • 838
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1021
  • 1275
  • 1321
  • 1333

Prompt Preview

Apply to Next.js 16 App Router and Pages Router applications on the Node.js runtime. Use a maintained Node.js line; Node.js 20 satisfies the framework's engine requirement but no longer receives security fixes. The deprecated Edge runtime and output: 'export' lack several controls below. The included baselines are Node.js 24, React 19 and TypeScript 7: on Node.js 22 or 26, a Pages Router app on React 18, or TypeScript 5.9 or 6.0, apply the Node.js, React or TypeScript prompt for the installed line instead. Next.js supports the 16 major as one line and ships its security releases on the newest minor of each supported major, backporting to older minors only in rare cases, so follow 16's newest minor and check API availability there; the cache, navigation and development settings below include 16.4 APIs. App Router runs the React server build compiled into Next.js; changing the application's React dependency alone does not replace it.

Server boundaries and data access

  • Put privileged reads and writes in a server-only data access layer; import server-only in modules containing credentials or privileged database clients. Authenticate the current request and authorize its tenant, object and operation there. Recheck on every Server Action, Route Handler and Pages API entry point, including direct RSC, prefetch, rewritten and localized requests.
  • Treat Proxy redirects, layout checks, hidden components, opaque action IDs and 'use server' as routing or execution behavior, not access control. Stop execution after an authorization failure before returning protected data