CVE-2026-27977: Next.js: null origin can bypass dev HMR websocket CSRF checks
Summary In next dev, cross-site protections for internal development endpoints could treat Origin: null as a bypass case even when allowedDevOrigins is configured. This could allow privacy-sensitive or opaque browser contexts, such as sandboxed documents, to access privileged internal dev-server functionality unexpectedly.
Published Mar 17, 2026 · Updated Mar 25, 2026
Affected packages
next
- Ecosystem
- npm
- Affected
- >= 16.0.1, < 16.1.7
- Fixed in
- 16.1.7
- Check
npm ls next
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
In next dev, cross-site protections for internal development endpoints could treat Origin: null as a bypass case even when `allowedDevOrigins` is configured. This could allow privacy-sensitive or opaque browser contexts, such as sandboxed documents, to access privileged internal dev-server functionality unexpectedly.
Impact
If a developer visits attacker-controlled content while running an affected next dev server with `allowedDevOrigins` configured, attacker-controlled browser code may be able to connect to internal development endpoints and interact with sensitive dev-server functionality that should have remained blocked.
This issue affects development mode only. It does not affect next start, and it does not expose internal debugging functionality to the network by default.
Patches
Fixed by validating Origin: null through the same cross-site origin-allowance checks used for other origins on internal development endpoints.
Workarounds
If upgrade is not immediately possible:
- Do not expose
next devto untrusted networks. - If you use `allowedDevOrigins`, reject requests and websocket upgrades with
Origin: nullfor internal dev endpoints at your proxy.
Credited to radu33, xdavidhu.
References
- https://github.com/vercel/next.js/security/advisories/GHSA-jcc7-9wpm-mj36
- https://github.com/vercel/next.js/commit/862f9b9bb41d235e0d8cf44aa811e7fd118cee2a
- https://github.com/vercel/next.js/releases/tag/v16.1.7
- https://nvd.nist.gov/vuln/detail/CVE-2026-27977
- https://github.com/advisories/GHSA-jcc7-9wpm-mj36
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-119346
Next.js: HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes
medium6.0Nov 19, 2026CVE-2026-119347
Next.js: SVG rejection bypass in the image optimization
medium6.9Nov 19, 2026CVE-2026-119348
Next.js: Cross-client response injection and disclosure in self-hosted Next.js applications forwarding fetched responses
medium6.3Nov 19, 2026CVE-2026-119349
Next.js: Cross-user cache disclosure and poisoning in Next.js use cache with binary arguments
medium6.3Nov 19, 2026CVE-2026-119350
Next.js: Cache poisoning of shared fallback shells in Cache Components via request-supplied placeholder route params
medium6.3Nov 19, 2026CVE-2026-119351
Next.js: Cache leak across root param values in nested 'use cache' functions via delayed inner stream metadata
medium6.3Nov 17, 2026
