{"id":"CVE-2026-27977","aliases":["GHSA-jcc7-9wpm-mj36"],"url":"https://o3.security/vulnerability/CVE-2026-27977","summary":"Next.js: null origin can bypass dev HMR websocket CSRF checks","details":"## Summary\nIn `next dev`, cross-site protections for internal development endpoints could treat `Origin: null` as a bypass case even when [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins) is configured. This could allow privacy-sensitive or opaque browser contexts, such as sandboxed documents, to access privileged internal dev-server functionality unexpectedly.\n\n## Impact\nIf a developer visits attacker-controlled content while running an affected `next dev` server with [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/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.\n\nThis issue affects development mode only. It does not affect `next start`, and it does not expose internal debugging functionality to the network by default.\n\n## Patches\nFixed by validating `Origin: null` through the same cross-site origin-allowance checks used for other origins on internal development endpoints.\n\n## Workarounds\nIf upgrade is not immediately possible:\n- Do not expose `next dev` to untrusted networks.\n- If you use [`allowedDevOrigins`](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins), reject requests and websocket upgrades with `Origin: null` for internal dev endpoints at your proxy.","published":"2026-03-17T23:56:24.631Z","modified":"2026-08-12T03:51:24.092770610Z","cvss":null,"epss":{"score":0.00171,"percentile":0.0684,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"next","fixedVersion":"16.1.7"}],"fix":{"url":"https://github.com/vercel/next.js/commit/862f9b9bb41d235e0d8cf44aa811e7fd118cee2a","label":"vercel/next.js@862f9b9"},"references":[{"type":"WEB","url":"https://github.com/vercel/next.js/releases/tag/v16.1.7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27977.json"},{"type":"ADVISORY","url":"https://github.com/vercel/next.js/security/advisories/GHSA-jcc7-9wpm-mj36"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27977"},{"type":"FIX","url":"https://github.com/vercel/next.js/commit/862f9b9bb41d235e0d8cf44aa811e7fd118cee2a"},{"type":"PACKAGE","url":"https://github.com/vercel/next.js"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:24.092770610Z"}}