{"id":"CVE-2026-27977","published":"2026-03-17T23:56:24Z","modified":"2026-03-18T19:56:16Z","title":"Next.js: null origin can bypass dev HMR websocket CSRF checks","vendor":"vercel","product":"next.js","tier":"tail","description":{"text":"Next.js is a React framework for building full-stack web applications. Starting in version 16.0.1 and prior to version 16.1.7, in `next dev`, cross-site protection for internal websocket endpoints could treat `Origin: null` as a bypass case even if `allowedDevOrigins` is configured, allowing privacy-sensitive/opaque contexts (for example sandboxed documents) to connect unexpectedly. If a dev server is reachable from attacker-controlled content, an attacker may be able to connect to the HMR websocket channel and interact with dev websocket traffic. This affects development mode only. Apps without a configured `allowedDevOrigins` still allow connections from any origin. The issue is fixed in version 16.1.7 by validating `Origin: null` through the same cross-site origin-allowance checks used for other origins. If upgrading is not immediately possible, do not expose `next dev` to untrusted networks and/or block websocket upgrades to `/_next/webpack-hmr` when `Origin` is `null` at the proxy.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00199,"percentile":0.09947,"provenance":"source"},"cwes":[{"id":"CWE-1385","name":"Missing Origin Validation in WebSockets"}],"references":[{"url":"https://github.com/vercel/next.js/security/advisories/GHSA-jcc7-9wpm-mj36","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vercel/next.js/commit/862f9b9bb41d235e0d8cf44aa811e7fd118cee2a","tags":["x_refsource_MISC"]},{"url":"https://github.com/vercel/next.js/releases/tag/v16.1.7","tags":["x_refsource_MISC"]}],"priority":{"score":3.6,"factors":[{"name":"EPSS percentile","points":1.99},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"vercel","affectedVersions":[{"vendor":"vercel","product":"next.js","versions":[">= 16.0.1, < 16.1.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-18T19:56:08.547586Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"next","vulnerableRanges":[">=16.0.1, <16.1.7"],"patched":["16.1.7"],"from":["GHSA-jcc7-9wpm-mj36"],"provenance":"source"}],"summary":{"text":"In Next.js versions from 16.0.1 up to but not including 16.1.7, the cross-site protection on the internal websocket endpoints used by next dev can treat a null origin as a bypass, even when allowedDevOrigins is configured, so privacy-sensitive contexts such as sandboxed documents can connect to the HMR websocket. An attacker who can get attacker-controlled content to reach a reachable development server, with the victim's browser involved in the interaction, could connect to the HMR channel and interact with development websocket traffic, though this affects development mode only.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:27Z"},"euvd":{"id":"EUVD-2026-12683","exploited":false,"provenance":"source"}}