Vulnerabilities in pkg:npm/@nuxt/webpack-builder
PACKAGECVE-2026-45670 is a MODERATE (CVSS 5.4) remote code execution vulnerability (CWE-749: Exposed Dangerous Method or Function) affecting Nuxt libraries in the npm ecosystem. The issue involves dev server exposes built source over lan to malicious sites (incomplete fix for ghsa-4gf7-ff8x-hq99). Remediation is available by upgrading affected packages to version 3.21.6, 4.4.6.
pkg:npm/@nuxt/webpack-builder
Vulnerability advisories affecting package pkg:npm/@nuxt/webpack-builder. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6m52-m754-pw2g | CVE-2026-45670 | MODERATE | Nuxt: Dev server exposes built source over LAN to malicious sites (incomplete fix for GHSA-4gf7-ff8x-hq99) |
| GHSA-x6qj-4h56-5rj5 | CVE-2026-49993 | MODERATE | @nuxt/webpack-builder and @nuxt/rspack-builder dev server same-origin check bypassed when Sec-Fetch-Site, Origin, and Referer are all absent (incomplete fix for GHSA-6m52-m754-pw2g) |
| GHSA-4gf7-ff8x-hq99 | CVE-2025-24361 | MODERATE | Opening a malicious website while running a Nuxt dev server could allow read-only access to code |
CVE-2026-45670 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2026-45670
To remediate this vulnerability, upgrade all affected Nuxt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @nuxt/rspack-builder@3.21.6
npm install @nuxt/rspack-builder@4.4.6
npm install @nuxt/webpack-builder@3.21.6
npm install @nuxt/webpack-builder@4.4.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @nuxt/rspack-builder
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-45670, inspect your project dependencies using npm:
npm ls @nuxt/rspack-builder
Analyze the terminal output to locate any version of Nuxt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.21.6), your application is affected.
Note: The npm ls @nuxt/rspack-builder command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-749: Exposed Dangerous Method or Function, where the product provides an applications programming interface (api) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted. In Nuxt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45670 Affected Nuxt Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@nuxt/rspack-builder
|
npm |
≥ 3.15.4
< 3.21.6
|
3.21.6
|
|
@nuxt/rspack-builder
|
npm |
≥ 4.0.0-alpha.1
< 4.4.6
|
4.4.6
|
|
@nuxt/webpack-builder
|
npm |
≥ 3.15.4
< 3.21.6
|
3.21.6
|
|
@nuxt/webpack-builder
|
npm |
≥ 4.0.0-alpha.1
< 4.4.6
|
4.4.6
|
References
Frequently Asked Questions
What is CVE-2026-45670?
Which Nuxt versions are affected?
What version fixes CVE-2026-45670?
Is @nuxt/rspack-builder affected?
Is @nuxt/webpack-builder affected?
What is the CVSS score of CVE-2026-45670?
What CWE is associated with CVE-2026-45670?
How can I check npm dependencies for CVE-2026-45670?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6m52-m754-pw2g",
"modified" : "2026-07-08T17:35:04Z",
"published" : "2026-05-19T15:51:14Z",
"aliases" : [ "CVE-2026-45670" ],
"summary" : "Nuxt: Dev server exposes built source over LAN to malicious sites (incomplete fix for GHSA-4gf7-ff8x-hq99)",
"details" : "### 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@nuxt/rspack-builder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.15.4"
}, {
"fixed" : "3.21.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.21.5"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@nuxt/rspack-builder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-alpha.1"
}, {
"fixed" : "4.4.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.4.5"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@nuxt/webpack-builder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.15.4"
}, {
"fixed" : "3.21.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.21.5"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@nuxt/webpack-builder"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-alpha.1"
}, {
"fixed" : "4.4.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.4.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nuxt/nuxt/security/advisories/GHSA-4gf7-ff8x-hq99"
}, {
"type" : "WEB",
"url" : "https://github.com/nuxt/nuxt/security/advisories/GHSA-6m52-m754-pw2g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45670"
}, {
"type" : "WEB",
"url" : "https://github.com/nuxt/nuxt/pull/35051"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nuxt/nuxt"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-749" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-19T15:51:14Z",
"nvd_published_at" : "2026-06-12T14:16:31Z"
}
}