All vulnerabilities

Servers and applications

GHSA-h5xj-x893-p5f7

Nuxt dev server exposes private runtime config through earlier Nitro build output

Severity
Low 3.7
Published
24 Nov 2026
Last changed
24 Nov 2026
Added to UpHeron
24 Nov 2026
Fixed in
4.0.0, 4.7.0
Weakness
Files or directories accessible to outside parties (CWE-552)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Sources
Project advisories (GitHub)

Description

The Vite dev server started by nuxt dev serves the server bundles left behind by an earlier nuxt build or nuxt generate. Nitro inlines the resolved runtimeConfig into those bundles, so private runtime config values resolved at build time can be read by anyone with HTTP access to an exposed dev server. This is an incomplete fix for GHSA-648h-gw55-m2g7, which covered the Nitro development bundle but not production build output in the same project.

nuxt build writes the Nitro server bundle to .output/server/, and nuxt generate writes a prerender bundle to /prerender/ (.nuxt/prerender/ or node_modules/.cache/nuxt/.nuxt/prerender/). Both are inside the directories the dev server is allowed to serve, so a later nuxt dev serves them:

The response contains every private runtime config value that was resolved when that build ran, such as a secret read from .env in nuxt.config:

From nuxt/nuxt's security advisory. Shortened; the full text is there.

Workarounds

Avoid exposing the dev server to untrusted networks. Alternatively, set private runtime config keys to an empty default in nuxt.config and provide their values with the matching NUXT_* environment variables (for example runtimeConfig: { apiSecret: '' } with NUXT_API_SECRET in .env), or remove .output, .nuxt/prerender and node_modules/.cache/nuxt before running nuxt dev (in a monorepo, for every app in the workspace).

If a dev server has been reachable by untrusted clients, rotate any credentials that were set through runtimeConfig in nuxt.config.

Workarounds as given by nuxt/nuxt's security advisory.

Affected software

SoftwareAffected versions
NuxtServers and applications · github:nuxt/nuxt
  • From 3.0.0 before 4.0.0
  • From 4.0.0 before 4.7.0

About Nuxt

JavaScript framework

From Wikidata, CC0 1.0.
Developers who used it in the past year
4%Stack Overflow Developer Survey 2025, 2025
Weekly downloads (npm)
3,545,145npm, 22 Nov 2026
GitHub stars
61,096GitHub, 22 Nov 2026
Forks
5,828GitHub, 22 Nov 2026
Latest release
v4.6.4GitHub, 22 Nov 2026
Released
2 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
JavaScript, Vue.jsWikidata
First published on GitHub
26 Oct 2016GitHub

Release lines

ReleaseLatestSecurity fixes
44.6.4Yes
33.21.11Ended 31 Jul 2026
22.18.1Ended 30 Jun 2024
11.4.5Ended 21 Sept 2019

From endoflife.date.

References