CVE-2026-128072: CVE-2026-128072: DNS Rebinding and Origin Validation Error in Nuxt Webpack and Rspack Development Builders
CVE-2026-128072: DNS Rebinding and Origin Validation Error in Nuxt Webpack and Rspack Development Builders Vulnerability ID: CVE-2026-128072 CVSS Score: 3.1 Published: 2026-11-16 CVE-2026-128072 (GHSA-x2wv-5868-p7v2
CVE-2026-128072: DNS Rebinding and Origin Validation Error in Nuxt Webpack and Rspack Development Builders
Vulnerability ID: CVE-2026-128072
CVSS Score: 3.1
Published: 2026-11-16
CVE-2026-128072 (GHSA-x2wv-5868-p7v2) is an origin validation vulnerability (CWE-346) in the Nuxt framework affecting the development middleware of @nuxt/webpack-builder and @nuxt/rspack-builder. Prior to version 4.6.4, the internal same-origin verification logic evaluated Sec-Fetch-Site, Origin, and Referer headers without first validating that the HTTP Host header belonged to an authorized hostname allowlist. This flaw allows a remote attacker to execute a DNS rebinding attack against a developer's local workstation, bypassing same-origin protections to read compiled client-side JavaScript chunks, inline source maps, local filesystem paths, and embedded client configuration values.
TL;DR
The development server middleware in @nuxt/webpack-builder (>= 3.0.0, < 4.6.4) and @nuxt/rspack-builder (>= 3.12.2, < 4.6.4) fails to validate the HTTP Host header against an allowlist prior to checking same-origin request headers. An attacker can use DNS rebinding to point an attacker-controlled domain to 127.0.0.1, causing the browser to send matching Host and Origin headers (and Sec-Fetch-Site: same-origin) to the local Nuxt development server, exfiltrating client bundles and source maps. Nuxt applications using the default Vite builder and production builds are unaffected. Upgrade to Nuxt 4.6.4 to remediate.
⚠️ Exploit Status: POC
Technical Details
- Vulnerability ID: CVE-2026-128072 / GHSA-x2wv-5868-p7v2
- Weakness Class: CWE-346: Origin Validation Error (DNS Rebinding)
- CVSS v3.1 Score: 3.1 Low (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N)
- EPSS Score: 0.136% (3.09th Percentile)
- Affected Components: @nuxt/webpack-builder (< 4.6.4), @nuxt/rspack-builder (< 4.6.4)
- Impact: Exfiltration of local dev client bundles, source maps, and filesystem paths
- Exploit Status: Conceptual PoC (DNS Rebinding); Not in CISA KEV
- Fixed Version: Nuxt 4.6.4
Affected Systems
- nuxt
- @nuxt/webpack-builder
- @nuxt/rspack-builder
-
nuxt: >= 3.0.0, < 4.6.4 (Fixed in:
4.6.4) -
@nuxt/webpack-builder: >= 3.0.0, < 4.6.4 (Fixed in:
4.6.4) -
@nuxt/rspack-builder: >= 3.12.2, < 4.6.4 (Fixed in:
4.6.4)
Code Analysis
Commit: f8d64c9
Added isAllowedHost check and required strict Host validation before evaluating Sec-Fetch-Site or Origin/Referer.
--- a/packages/webpack/src/utils/same-origin.ts
+++ b/packages/webpack/src/utils/same-origin.ts
@@ -1,17 +1,48 @@
+import { isIP } from 'node:net'
+
const LOOPBACK_HOSTNAMES = new Set(['localhost', '127.0.0.1', '::1'])
+interface DevRequest {
+ headers: Record<string, string | string[] | undefined>
+}
+
function firstHeader (value: string | string[] | undefined): string | undefined {
return Array.isArray(value) ? value[0] : value
}
+function parseHostname (host: string): string | undefined {
+ const value = host.trim().toLowerCase()
+ if (value.startsWith('[')) {
+ const end = value.indexOf(']')
+ return end > 1 ? value.slice(1, end) : undefined
+ }
+ return value.split(':')[0] || undefined
+}
+
function isLoopbackHost (host: string | undefined): boolean {
- if (!host) { return false }
- const withoutPort = host.replace(/:\d+$/, '')
- const hostname = withoutPort.replace(/^\[|\]$/g, '').toLowerCase()
- return LOOPBACK_HOSTNAMES.has(hostname)
+ const hostname = host && parseHostname(host)
+ return !!hostname && LOOPBACK_HOSTNAMES.has(hostname)
}
-export function isSameOriginRequest (req: { headers: Record<string, string | string[] | undefined> }): boolean {
+export function isAllowedHost (host: string | undefined, allowedHosts: readonly string[] | true = []): boolean {
+ if (!host || allowedHosts === true) { return true }
+ const hostname = parseHostname(host)
+ if (!hostname) { return false }
+ if (hostname === 'localhost' || hostname.endsWith('.localhost') || isIP(hostname)) { return true }
+ for (const entry of allowedHosts) {
+ const allowed = entry.toLowerCase()
+ if (allowed === hostname) { return true }
+ if (allowed.startsWith('.') && (hostname === allowed.slice(1) || hostname.endsWith(allowed))) { return true }
+ }
+ return false
+}
+
+export function isSameOriginRequest (req: DevRequest, allowedHosts?: readonly string[] | true): boolean {
+ const host = firstHeader(req.headers.host)
+ if (!isAllowedHost(host, allowedHosts)) {
+ return false
+ }
+
const site = firstHeader(req.headers['sec-fetch-site'])
if (site !== undefined) {
return site === 'same-origin' || site === 'none'
@@ -25,11 +56,11 @@ export function isSameOriginRequest (req: { headers: Record<string, string | str
// headers absent if the attacker page is on a non-trustworthy origin
// (drops `Sec-Fetch-*`), uses a non-CORS `<script>` (no `Origin`), and sets
// `Referrer-Policy: no-referrer` (drops `Referer`).
- return isLoopbackHost(firstHeader(req.headers.host))
+ return isLoopbackHost(host)
}
try {
- return new URL(initiator).host === firstHeader(req.headers.host)
+ return new URL(initiator).host === host
} catch {
return false
}
Commit: 3e1c796
Introduced the devServer.allowedHosts configuration schema in @nuxt/schema and passed it down through the Nitro and bundler layers.
Commit: 3c96453
Enforced that Webpack hot middleware is skipped and returns HTTP 403 for forbidden dev requests.
Commit: 8c11d96
Ensured that hosts permitted by the CLI after initial config loading are aggregated dynamically.
Mitigation Strategies
- Upgrade Nuxt, @nuxt/webpack-builder, and @nuxt/rspack-builder to version 4.6.4 or later to enforce strict Host header allowlist validation.
- Migrate from @nuxt/webpack-builder or @nuxt/rspack-builder to the default @nuxt/vite-builder where project compatibility permits.
- Configure explicit hostname allowlists via devServer.allowedHosts in nuxt.config.ts rather than disabling host validation with allowedHosts: true.
- Use modern browsers that enforce Local Network Access (LNA) / Private Network Access (PNA) restrictions to block public domains from silently connecting to 127.0.0.1.
Remediation Steps:
- Inspect package.json and nuxt.config.ts to determine if @nuxt/webpack-builder or @nuxt/rspack-builder is in use.
- Run
npm install nuxt@^4.6.4(or the equivalent pnpm/yarn command) to update Nuxt and its builder packages to 4.6.4+. - If using custom development hostnames or reverse proxies, add the specific domain names to
devServer.allowedHostsinnuxt.config.ts. - Verify the fix by sending a curl request with an arbitrary Host header (
curl -i -H 'Host: evil.example.com' -H 'Sec-Fetch-Site: same-origin' http://127.0.0.1:3000/_nuxt/) and confirming the server returnsHTTP/1.1 403 Forbidden.
References
- GitHub Security Advisory: GHSA-x2wv-5868-p7v2
- NVD Vulnerability Record: CVE-2026-128072
- CVE.org Record: CVE-2026-128072
- GitHub Commit: Host header validation fix (f8d64c9aa773a033596532365d455890da9da197)
- GitHub Commit: allowedHosts schema & config (3e1c7964e6843e1c5f218867a4ccd4cd00ad9ebb)
- GitHub Commit: Hot middleware restriction (3c9645326a2b3f5cfa09c9a935db9b1825d560e7)
- GitHub Commit: CLI allowed hosts resolution (8c11d965dad5bfc58d4c25e796915aec045acb78)
- Nuxt Release v4.6.4
Read the full report for CVE-2026-128072 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.