AAK-MCP-NEXTJS-CVE-2026-94486-001: Next.js 16.0.0 to 16.3.7: the next dev server's MCP endpoint answers cross-site requests (dev server only)
- Severity
- LOW
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
NextjsDevServerMcpCrossSite
What it detects
Next.js 16's development server (next dev) serves a Model Context Protocol endpoint for coding agents. Before 16.3.8 it did not reliably check which site a request came from, so a malicious page the developer visits while the dev server runs can reach it and read the project's location on disk, source snippets from error reports, the route inventory and the development logs (CVE-2026-94486, CVSS 4.0 2.3, CWE-346, GHSA-39w2-rjm5-chcv). Dev server only: production deployments (next start, a static export, a hosted build) do not serve the endpoint. The MCP middleware arrived in 16.0.0, and 16.3.8 fixes it (fix commit 2d9f50a).
How to fix
Upgrade next to 16.3.8 or later and pin it. Until then, stop next dev when it is not in use. Production builds need no change.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-NEXTJS-CVE-2026-94486-001
Limitations
Dev server only, so a project that never runs next dev is reported without being exposed. Reads a "next" dependency entry or a versioned npx next@<version> launch, reporting a range that admits a version from 16.0.0 up to 16.3.8, and the version a lockfile resolves. latest, canary and other tags state no version and are not reported, and neither is next dev in a script. 16.4.0 canaries compare as 16.4.0 and are not reported. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-94486
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP07:2025 (Insufficient Authentication & Authorization)
- OWASP Agentic Top 10: ASI04 (Agentic Supply Chain Vulnerabilities), ASI07 (Insecure Inter-Agent Communication)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-NETWORK-01
- CSA AI Controls Matrix (AICM): IVS-04, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-NEXTJS-CVE-2026-94486-001.md: the page then shows that text, with the registry reference appended under it.