Next.js has information disclosure in development server's Model Context Protocol endpoint
Affected releases · next
- 16.x16.0.0 – 16.3.7Fixed in 16.3.8
On 16.x, the newest line:
npm install next@16.3.8Not affected
0.1.0 – 15.5.28
378 releases
Affected
16.0.0 – 16.3.7
41 releases
Fixed
16.3.8 – 16.4.2
4 releases, latest
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
The Next.js development server (next dev) exposes a Model Context Protocol endpoint that does not verify which website a request originates from, allowing a malicious website visited by the developer to read sensitive development data — including the project's location on disk, source code snippets from error reports, the route inventory, and development logs. Only applications run with next dev are affected. Production deployments do not serve this endpoint.