Next.js: Unauthenticated disclosure of internal Server Function endpoints
Affected releases · next
- 16.x16.0.0 – 16.2.10Fixed in 16.2.11
- 15.x15.0.0 – 15.5.20Fixed in 15.5.21
- 14.x14.0.0 – 14.2.35No fix on this line yet
- 13.x13.0.0 – 13.5.11No fix on this line yet
On 16.x, the newest line:
npm install next@16.2.11Affected
16.0.0 – 16.2.10
31 releases
Fixed
16.2.11 – 16.4.2
14 releases, latest
Affected
15.0.0 – 15.5.20
74 releases
Fixed
15.5.21 – 15.5.28
8 releases
Affected
14.0.0 – 14.2.35
46 releases
Affected
13.0.0 – 13.5.11
56 releases
Is your project affected?
Paste your package.json, or type the range you declare for next. It is read in your browser and sent nowhere.
What happens
Impact
In Next.js applications using App Router, Server Actions (use server) or use cache endpoints can be disclosed bypassing any authentication on the pages where these endpoints are usually used.
Server Action IDs can be disclosed to unauthenticated users via publicly served client artifacts (for example, static chunks containing action references).
Affected users are applications using App Router + Server Actions.
By itself, this disclosure is typically a recon/enumeration primitive; however, it can increase risk when combined with other weaknesses.
Workarounds
Never assume any authentication claims at the use cache or use server boundary. Always authenticate within the boundary.