Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-94485 Overview
CVE-2026-94485 affects the Next.js development server in versions 16.0.0 through 16.3.7. The next dev server exposes a Model Context Protocol (MCP) endpoint without reliably restricting cross-site requests. A malicious website visited by a developer can reach the local endpoint through DNS rebinding and read the project's disk location, source code snippets from error reports, route inventory, and development logs. Production deployments do not serve this endpoint, limiting exposure to active development environments. Vercel addressed the issue in Next.js 16.3.8 by hardening the MCP middleware against cross-origin and rebinding attacks.
Critical Impact
A malicious site visited by a developer can exfiltrate local project paths, source code fragments, route data, and dev logs from the next dev MCP endpoint.
Affected Products
- Vercel Next.js 16.0.0 through 16.3.7 (development server only)
- Projects using next dev with the MCP middleware enabled
- Node.js-based Next.js deployments running the development server
Discovery Timeline
- 2026-10-02 - CVE-2026-94485 published to NVD
- 2026-10-05 - Last updated in NVD database
Technical Details for CVE-2026-94485
Vulnerability Analysis
The vulnerability is an origin validation flaw [CWE-346] in the Next.js development server's MCP middleware. When a developer runs next dev, the server binds locally and exposes an MCP endpoint intended for tooling integrations. The middleware does not reliably verify request origins or Host header values. An attacker-controlled website can therefore script requests that reach the local endpoint through DNS rebinding, bypassing same-origin protections.
Once the endpoint responds, the attacker page can read sensitive development data. This includes the absolute project path on disk, source code fragments embedded in error reports, the application's route inventory, and development logs. The issue is confined to the development server; production builds served by next start do not expose MCP.
Root Cause
The root cause is missing or inconsistent cross-site request restrictions on the MCP endpoint registered in packages/next/src/server/mcp/get-mcp-middleware.ts. The middleware trusted inbound requests without validating the Host header against an allowed-origins list, which permitted DNS rebinding to defeat browser-origin checks.
Attack Vector
Exploitation requires a developer to visit an attacker-controlled web page while next dev is running locally. The attacker page uses DNS rebinding to point a controlled hostname at 127.0.0.1, then issues MCP requests from the browser. The responses leak project metadata back to the attacker's JavaScript, which can exfiltrate it to a remote server.
// Patch excerpt: packages/next/src/server/lib/router-utils/block-cross-site-dev.ts
import { parseUrl } from '../../../lib/url'
import { warnOnce } from '../../../build/output/log'
import { isCsrfOriginAllowed } from '../../app-render/csrf-protection'
+import { parsePath } from '../../../shared/lib/router/utils/parse-path'
const allowedDevOriginsDocs =
'https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins'
// Patch excerpt: packages/next/src/server/mcp/get-mcp-middleware.ts
type McpServerOptions,
} from './get-or-create-mcp-server'
import { parseBody } from '../api-utils/node/parse-body'
+import { parsePath } from '../../shared/lib/router/utils/parse-path'
+import { removeTrailingSlash } from '../../shared/lib/router/utils/remove-trailing-slash'
import { StreamableHTTPServerTransport } from 'next/dist/compiled/@modelcontextprotocol/sdk/server/streamableHttp'
export function getMcpMiddleware(options: McpServerOptions) {
Source: vercel/next.js commit 2d9f50a
Detection Methods for CVE-2026-94485
Indicators of Compromise
- Unexpected HTTP requests to the local MCP endpoint on the next dev port, typically localhost:3000, originating from browser contexts other than the developer's own tooling.
- Inbound requests carrying a Host header that resolves externally but targets a loopback address, consistent with DNS rebinding.
- Outbound traffic from a developer workstation to unfamiliar domains shortly after visiting third-party websites while next dev is active.
Detection Strategies
- Monitor developer workstation telemetry for connections to next dev ports originating from browser renderer processes tied to untrusted domains.
- Inspect proxy or EDR logs for repeated POST requests to MCP paths handled by get-mcp-middleware.ts with non-local Host headers.
- Correlate browser navigation events with local HTTP server access logs to identify cross-site request patterns.
Monitoring Recommendations
- Enable verbose request logging in next dev during triage and review Host and Origin headers for anomalies.
- Alert on Next.js versions between 16.0.0 and 16.3.7 detected in developer environments via software inventory.
- Track outbound DNS queries from developer hosts for rapidly changing A records pointing to loopback addresses.
How to Mitigate CVE-2026-94485
Immediate Actions Required
- Upgrade Next.js to version 16.3.8 or later on every developer workstation and CI runner that executes next dev.
- Audit developer machines for the vulnerable version range and restart any long-running next dev sessions after patching.
- Instruct developers to avoid browsing untrusted sites in the same browser profile used while next dev is running.
Patch Information
Vercel released the fix in Next.js v16.3.8. The patch, tracked in GHSA-f87g-xv8r-7p7x, hardens the MCP middleware against DNS rebinding by validating request paths and origin headers. Review the full change in the upstream commit 2d9f50a.
Workarounds
- Bind next dev to an interface not reachable from the browser session, or run it inside an isolated container or VM.
- Configure allowedDevOrigins in next.config.js to restrict acceptable request origins during development.
- Use a separate browser profile or dedicated browser for development that does not visit arbitrary external sites.
# next.config.js - restrict dev-server origins
module.exports = {
allowedDevOrigins: ['http://localhost:3000', 'http://127.0.0.1:3000'],
}
# Upgrade to the patched release
npm install next@16.3.8
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

